AAIT#33877 Foto in bonnen en e-mails: robuuster (logged ignore) om mail-bom te voorkomen

svn path=/Website/trunk/; revision=29043
This commit is contained in:
Jos Groot Lipman
2016-04-19 15:08:38 +00:00
parent 7c791c2ac2
commit 27856712e9

View File

@@ -156,9 +156,15 @@ function sendMail( p_mailfrom
while (startPos > 4 && eindPos > startPos) while (startPos > 4 && eindPos > startPos)
{ {
var flexcode = p_bodyhtml.substring(startPos + 1, eindPos); var flexcode = p_bodyhtml.substring(startPos + 1, eindPos);
if (flexcode.indexOf("M=") < 0)
{
Log2File(1, "<img frc=...> found in XML but invalid. Ignored: " + flexcode);
break;
}
if (!S("puo_fclt_web_url") || !S("puo_fclt_web_apikey")) if (!S("puo_fclt_web_url") || !S("puo_fclt_web_apikey"))
{ {
throw { description: "<img frc=...> found in XML but puo_fclt_web_url or puo_fclt_web_apikey not set" }; Log2File(1, "<img frc=...> found in XML but puo_fclt_web_url or puo_fclt_web_apikey not set. Ignored: " + flexcode);
break;
} }
// om te voorkomen dat je elke klant in de hosts file moet opnemen wordt // om te voorkomen dat je elke klant in de hosts file moet opnemen wordt
@@ -211,12 +217,18 @@ function sendMail( p_mailfrom
var logoPathName = custabspath + "/" + logoFileName; var logoPathName = custabspath + "/" + logoFileName;
Log2File(2, logoFileName); Log2File(2, logoFileName);
Log2File(2, "After bodyHTML"); Log2File(2, "After bodyHTML");
objMail.addRelatedBodyPart(logoPathName, logoFileName, 0); try {
objMail.addRelatedBodyPart(logoPathName, logoFileName, 0);
}
catch (e)
{
throw new UserException(e + 1000, "PutOrders", e.description + "\nPerhaps invalid logo path: "+ logoPathName);
}
} }
} }
catch(e) catch(e)
{ {
throw new UserException(e + 1000, "PutOrders", e.description + "\nPerhaps invalid logo path: "+ logoPathName); throw new UserException(e + 1000, "PutOrders", e.description);
} }
} }