FCLT#57124 Sender_Rewriting_Scheme standaard decoderen
svn path=/Website/branches/v2019.1/; revision=41819
This commit is contained in:
@@ -62,11 +62,6 @@ if (API.apidata.loglevel)
|
||||
|
||||
var Subject = XMLval(xmlReq, "subject");
|
||||
var fromAddr = XMLval(xmlReq, "fromaddr"); // "Returns the address that the sender gave in the MAIL FROM SMTP-command."
|
||||
// srs address: servicedesk+SRS=kWNyq=RW=manutan.nl=Paul.Gozeling@hsleiden.nl
|
||||
// output groups: 1. servicedesk 2. kWNyq 3. manutan.nl 4. Paul.Gozeling
|
||||
var regExpr = RegExp("(.+)[+]SRS=(.+)[=].+=(.+)=(.+)[@]");
|
||||
if (regExpr.test(fromAddr))
|
||||
fromAddr = regExpr.exec(fromAddr)[4] + "@" + regExpr.exec(fromAddr)[3];
|
||||
var from = XMLval(xmlReq, "from"); // "This property returns the content of the From MIME-header of the email."
|
||||
var toAddr = XMLval(xmlReq, "to");
|
||||
var RecipientNr = XMLval(xmlReq, "RecipientNr"); // 0 voor 1e recipient, soms 1 voor tweede
|
||||
@@ -110,7 +105,15 @@ if (oRs("fac_email_setting_expire").Value != null)
|
||||
var theFrom = fromAddr; // SMTP communicatie, werkt matig bij forwards
|
||||
if (oRs("fac_email_setting_frommode").Value == 1)
|
||||
theFrom = from; // uit email MIME-header
|
||||
|
||||
else if (oRs("fac_email_setting_frommode").Value == 2)
|
||||
{
|
||||
// example srs address: servicedesk+SRS=kWNyq=RW=manutan.nl=Paul.Gozeling@hsleiden.nl
|
||||
// output groups of RegExp: 1. servicedesk 2. kWNyq 3. manutan.nl 4. Paul.Gozeling
|
||||
// from e-mail address when SRS is detected: Paul.Gozeling@manutan.nl
|
||||
var regExpr = RegExp("(.+)[+]SRS=(.+)[=].+=(.+)=(.+)[@]");
|
||||
if (regExpr.test(fromAddr)) // test whether the fromAddr is a SRS address
|
||||
fromAddr = regExpr.exec(fromAddr)[4] + "@" + regExpr.exec(fromAddr)[3]; // concat (group-4 @ group-3) as the fromAddr
|
||||
}
|
||||
var shouldFrom = oRs("fac_email_setting_from").Value;
|
||||
if (shouldFrom)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user