FSN#37452 Ooit SMTP rechtstreeks via de klantserver: alvast S("puo_smtpusessl") en S("puo_smtpconnectiontimeout") gedefinieerd.
svn path=/Website/trunk/; revision=30305
This commit is contained in:
@@ -40,22 +40,27 @@ function sendMail( p_mailfrom
|
||||
|
||||
// De onderstaande configuratie is ook handig voor het testen op een lokale pc.
|
||||
// Dan heb je geen lokale SMTP service nodig
|
||||
if (S("puo_sendusing") == 2) // cdoSendUsingPort
|
||||
{
|
||||
if (S("puo_sendusing") == 2) // cdoSendUsingPort
|
||||
{
|
||||
var objConf = new ActiveXObject("CDO.Configuration");
|
||||
var sch = "http://schemas.microsoft.com/cdo/configuration/"
|
||||
objConf.Fields(sch+"sendusing").Value = S("puo_sendusing"); // 1=cdoSendUsingPickup, 2=cdoSendUsingPort
|
||||
objConf.Fields(sch+"smtpserver").Value = S("puo_smtpserver"); // Wel voor ons IP-adres relay toestaan!
|
||||
objConf.Fields(sch+"smtpserverport").Value = S("puo_smtpserverport"); // default 25
|
||||
objConf.Fields(sch+"smtpauthenticate").Value = S("puo_smtpauthenticate"); // default 0=cdoAnonymous, 1=cdoBasic, 2=cdoNTLM
|
||||
if (S("puo_smtpauthenticate") == 1)
|
||||
{
|
||||
objConf.Fields(sch+"sendusername").Value = S("puo_sendusername");
|
||||
objConf.Fields(sch+"sendpassword").Value = S("puo_sendpassword");
|
||||
}
|
||||
objConf.Fields.Update();
|
||||
var sch = "http://schemas.microsoft.com/cdo/configuration/"
|
||||
objConf.Fields(sch + "sendusing").Value = S("puo_sendusing"); // 1=cdoSendUsingPickup, 2=cdoSendUsingPort
|
||||
objConf.Fields(sch + "smtpserver").Value = S("puo_smtpserver"); // Wel voor ons IP-adres relay toestaan!
|
||||
objConf.Fields(sch + "smtpserverport").Value = S("puo_smtpserverport"); // default 25
|
||||
objConf.Fields(sch + "smtpconnectiontimeout").Value = S("puo_smtpconnectiontimeout"); // default 30
|
||||
if (S("puo_smtpusessl"))
|
||||
{
|
||||
objConf.Fields(sch + "smtpusessl").Value = true;
|
||||
}
|
||||
objConf.Fields(sch + "smtpauthenticate").Value = S("puo_smtpauthenticate"); // default 0=cdoAnonymous, 1=cdoBasic, 2=cdoNTLM
|
||||
if (S("puo_smtpauthenticate") == 1)
|
||||
{
|
||||
objConf.Fields(sch + "sendusername").Value = S("puo_sendusername");
|
||||
objConf.Fields(sch + "sendpassword").Value = S("puo_sendpassword");
|
||||
}
|
||||
objConf.Fields.Update();
|
||||
objMail.Configuration = objConf;
|
||||
}
|
||||
}
|
||||
//
|
||||
|
||||
Log2File(3, "In SendMail sender=" + p_mailfrom);
|
||||
@@ -83,7 +88,7 @@ function sendMail( p_mailfrom
|
||||
|
||||
if (!p_mailto || !MailSender)
|
||||
{
|
||||
Log2File(1, "Notification email not sent...");
|
||||
Log2File(1, "Email not sent.because from or to is empty.");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user