Skip to content
Snippets Groups Projects
Commit 85157793 authored by Benjamin Ulrich's avatar Benjamin Ulrich :speech_balloon:
Browse files

[Projekt: Entwicklung - Neon][TicketNr.: 1061035][Serienmail - Testen - Fehler im Serverlog]

parent 650da01a
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,8 @@ import("Communication_lib");
import("DocumentTemplate_lib");
import("system.neon");
import("system.mail");
import("Bulkmail_lib")
import("Bulkmail_lib");
import("system.tools");
function EmailWritingUtils () {}
......@@ -382,18 +383,13 @@ Email.prototype.send = function (pUser)
if (this.sender)
mail.setSender(mailId, this.sender);
var mailbridgeTitle = "mailbridge";
var sentMails;
if(pUser)
sentMails = mail.sendMailAs(pUser, mailId)
else
{
let mailbridgeExists = newSelect("ASYS_USERS.PROPVAL", SqlUtils.getSystemAlias())
.from("ASYS_USERS")
.where("ASYS_USERS.PROPVAL", "title")
.and("ASYS_USERS.PROPVAL", mailbridgeTitle)
.cell();
let mailbridgeExists = tools.getUser(mailbridgeTitle);
if(mailbridgeExists)
mail.sendMailAs(mailbridgeTitle, mailId)
else //check mailbridge user if this error gets thrown
......
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