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

Email preset sender, added caption for custom template

(cherry picked from commit c16596fd)
parent ddff179a
No related branches found
No related tags found
No related merge requests found
......@@ -65,6 +65,7 @@
</entityParameter>
<entityField>
<name>bindata</name>
<title>Custom template</title>
<contentType>FILE</contentType>
</entityField>
<entityActionField>
......
......@@ -38,6 +38,7 @@
</entityParameter>
<entityField>
<name>bindata</name>
<title>Custom template</title>
<contentType>FILE</contentType>
</entityField>
<entityActionField>
......
......@@ -101,6 +101,7 @@
</entityConsumer>
<entityField>
<name>bindata</name>
<title>Custom template</title>
<contentType>FILE</contentType>
</entityField>
<entityField>
......
......@@ -125,6 +125,10 @@
<key>Long string value</key>
<value>Langer String-Wert</value>
</entry>
<entry>
<key>Custom template</key>
<value>Benutzerdefinierte Vorlage</value>
</entry>
<entry>
<key>Attribute groups can't be selected</key>
<value>Eigenschafsgruppen können nicht verwendet werden</value>
......
......@@ -112,13 +112,8 @@ Email.fromRFC = function (pBase64RFC)
Email.fromTemplate = function (pTemplateId, pContactId, pBindata)
{
var template;
if (pBindata && pBindata.isFilled())
{
if (BulkMailUtils.isValidMimeType(pBindata.mimeType))
{
template = new DocumentTemplate(pBindata.bindata, DocumentTemplate.types.fromMimeType(pBindata.mimeType), pBindata.filename, true);
}
}
if (pBindata && pBindata.isFilled() && BulkMailUtils.isValidMimeType(pBindata.mimeType))
template = new DocumentTemplate(pBindata.bindata, DocumentTemplate.types.fromMimeType(pBindata.mimeType), pBindata.filename, true);
else
{
template = DocumentTemplate.loadTemplate(pTemplateId);
......@@ -220,6 +215,9 @@ Email.prototype._newMailObject = function()
mail.clearRecipients(mailId, mail.RECIPIENT_BCC);
}
if (this.sender)
mail.setSender(mailId, this.sender);
if (this.toRecipients.length)
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