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

Merge branch 'm_1082236_bulkmail_useroption' into '2021.1.1'

M 1082236 bulkmail useroption

See merge request xrm/basic!1104
parents dc5fc42c 7e0df447
No related branches found
No related tags found
No related merge requests found
......@@ -197,6 +197,10 @@
<description>Save Location for send Mails. Path is relative to Serverpath</description>
<property>/bulkMailFiles/</property>
</customStringProperty>
<customStringProperty>
<name>bulkmail.user</name>
<description>Title of the useraccount that is used to send bulkmails</description>
</customStringProperty>
<customStringProperty>
<name>mosaico.url</name>
<description>Url of the Mosaico Email Editor</description>
......
......@@ -78,6 +78,8 @@ BulkMailUtils.sendBulkMail = function (pBulkMailId, pIsTestRun)
pIsTestRun = false;
}
var sendUserTitle = project.getPreferenceValue("custom.bulkmail.user");
var [templateId, subject, emailSender, createActivity, bulkMailName, useTemplateAttachments] =
newSelect("DOCUMENTTEMPLATE_ID, SUBJECT, SENDER_EMAIL_ADDRESS, CREATEACTIVITIES, NAME, USE_TEMPLATE_ATTACHMENTS")
.from("BULKMAIL")
......@@ -190,7 +192,7 @@ BulkMailUtils.sendBulkMail = function (pBulkMailId, pIsTestRun)
email.subject = subjects[contactId];
BulkMailUtils.storeEmlFile(pBulkMailId, mailrunId, mailLogId,email.getEML());
isSuccess = email.send();
isSuccess = email.send(sendUserTitle);
if (!isSuccess)
{
var errorMessage = logging.toLogString(email.getMailError(), true);
......@@ -202,6 +204,7 @@ BulkMailUtils.sendBulkMail = function (pBulkMailId, pIsTestRun)
recipientStatus = bouncedStatus || $KeywordRegistry.bulkMailRecipientStatus$failed();
}
email.send(sendUserTitle);
}
//set the recipient status to 'sent' or 'failed'
......@@ -305,7 +308,7 @@ BulkMailUtils.sendBulkMail = function (pBulkMailId, pIsTestRun)
let nextMailLogId = util.getNewUUID();
email.body = StringUtils.replaceAll(email.body,currentMailLogId,nextMailLogId);
currentMailLogId = nextMailLogId;
isSuccess = email.send();
isSuccess = email.send(sendUserTitle);
Array.prototype.push.call(isSuccess ? successIds : failedIds, recipientData[i]["BULKMAILRECIPIENTID"]);
......
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