Skip to content
Snippets Groups Projects
Commit c16596fd authored by Sebastian Listl's avatar Sebastian Listl :speech_balloon:
Browse files

Email preset sender, added caption for custom template

parent 5ede4224
No related branches found
No related tags found
No related merge requests found
...@@ -121,6 +121,7 @@ ...@@ -121,6 +121,7 @@
</entityConsumer> </entityConsumer>
<entityField> <entityField>
<name>bindata</name> <name>bindata</name>
<title>Custom template</title>
<contentType>FILE</contentType> <contentType>FILE</contentType>
<valueProcess>%aditoprj%/entity/BulkMail_entity/entityfields/bindata/valueProcess.js</valueProcess> <valueProcess>%aditoprj%/entity/BulkMail_entity/entityfields/bindata/valueProcess.js</valueProcess>
<onValueChange>%aditoprj%/entity/BulkMail_entity/entityfields/bindata/onValueChange.js</onValueChange> <onValueChange>%aditoprj%/entity/BulkMail_entity/entityfields/bindata/onValueChange.js</onValueChange>
......
...@@ -65,6 +65,7 @@ ...@@ -65,6 +65,7 @@
</entityParameter> </entityParameter>
<entityField> <entityField>
<name>bindata</name> <name>bindata</name>
<title>Custom template</title>
<contentType>FILE</contentType> <contentType>FILE</contentType>
</entityField> </entityField>
<entityActionField> <entityActionField>
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
</entityParameter> </entityParameter>
<entityField> <entityField>
<name>bindata</name> <name>bindata</name>
<title>Custom template</title>
<contentType>FILE</contentType> <contentType>FILE</contentType>
</entityField> </entityField>
<entityActionField> <entityActionField>
......
...@@ -95,6 +95,7 @@ ...@@ -95,6 +95,7 @@
</entityConsumer> </entityConsumer>
<entityField> <entityField>
<name>bindata</name> <name>bindata</name>
<title>Custom template</title>
<contentType>FILE</contentType> <contentType>FILE</contentType>
</entityField> </entityField>
<entityField> <entityField>
......
...@@ -73,6 +73,10 @@ ...@@ -73,6 +73,10 @@
<key>Long string value</key> <key>Long string value</key>
<value>Langer String-Wert</value> <value>Langer String-Wert</value>
</entry> </entry>
<entry>
<key>Custom template</key>
<value>Benutzerdefinierte Vorlage</value>
</entry>
<entry> <entry>
<key>Attribute groups can't be selected</key> <key>Attribute groups can't be selected</key>
<value>Eigenschafsgruppen können nicht verwendet werden</value> <value>Eigenschafsgruppen können nicht verwendet werden</value>
......
...@@ -107,13 +107,8 @@ Email.fromRFC = function (pBase64RFC) ...@@ -107,13 +107,8 @@ Email.fromRFC = function (pBase64RFC)
Email.fromTemplate = function (pTemplateId, pContactId, pBindata) Email.fromTemplate = function (pTemplateId, pContactId, pBindata)
{ {
var template; var template;
if (pBindata && pBindata.isFilled()) if (pBindata && pBindata.isFilled() && BulkMailUtils.isValidMimeType(pBindata.mimeType))
{ template = new DocumentTemplate(pBindata.bindata, DocumentTemplate.types.fromMimeType(pBindata.mimeType), pBindata.filename, true);
if (BulkMailUtils.isValidMimeType(pBindata.mimeType))
{
template = new DocumentTemplate(pBindata.bindata, DocumentTemplate.types.fromMimeType(pBindata.mimeType), pBindata.filename, true);
}
}
else else
template = DocumentTemplate.loadTemplate(pTemplateId); template = DocumentTemplate.loadTemplate(pTemplateId);
...@@ -210,6 +205,9 @@ Email.prototype._newMailObject = function() ...@@ -210,6 +205,9 @@ Email.prototype._newMailObject = function()
mail.clearRecipients(mailId, mail.RECIPIENT_BCC); mail.clearRecipients(mailId, mail.RECIPIENT_BCC);
} }
if (this.sender)
mail.setSender(mailId, this.sender);
if (this.toRecipients.length) if (this.toRecipients.length)
mail.addRecipients(mailId, mail.RECIPIENT_TO, this.toRecipients); mail.addRecipients(mailId, mail.RECIPIENT_TO, this.toRecipients);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment