FCLT#83973 Eenvoudige notificaties toch ook uitgebreidere body ondersteunen

svn path=/Website/trunk/; revision=64903
This commit is contained in:
Jos Groot Lipman
2024-05-30 11:57:57 +00:00
parent e46290cd7a
commit a839fb2247

View File

@@ -298,12 +298,21 @@ function notificationMail(rec, p_notificationXSL, params)
}
else if (!rec("fac_srtnotificatie_xmlnode").value)
{
Log2File(2, "Mailnotificatie basis");
Log2File(2, "Text-only notificatie");
var subject = rec("fac_notificatie_oms").Value;
var body = subject;
var htmlbody = "";
if (subject.indexOf("<br>") > 0)
{
var body = "";
var htmlbody = subject.substr(subject.indexOf('<br>') + 4); // de rest
var subject = subject.split('<br>', 1)[0]; // alleen tot 1e <br> in de subject
}
sendMail( sender_email
, receiver_email
, rec("fac_notificatie_oms").Value
, rec("fac_notificatie_oms").Value
, ""
, subject
, body
, htmlbody
, mail_params
);
}