N
Neil Jarman
Hi,
I usually use VBScript to send emails, however I need to use JavaScript.
Can anyone supply the necessary code - I have tried this literal translation
and although it doesn't cause any errors, no mail arrives.
var sch = "http://schemas.microsoft.com/cdo/configuration/";
var cdoConfig = Server.CreateObject("CDO.Configuration");
cdoConfig.Fields.Item(sch & "sendusing") = 2;
cdoConfig.Fields.Item(sch & "smtpserver") = "smtp.xyz.co.uk";
cdoConfig.Fields.Update();
var cdoMessage = Server.CreateObject("CDO.Message");
cdoMessage.Configuration = cdoConfig;
cdoMessage.From = "[email protected]";
cdoMessage.To = "(e-mail address removed)";
cdoMessage.Subject = sSubject;
cdoMessage.TextBody = sBody;
cdoMessage.Send();
Any help appreciated.
Regards,
NEIL
I usually use VBScript to send emails, however I need to use JavaScript.
Can anyone supply the necessary code - I have tried this literal translation
and although it doesn't cause any errors, no mail arrives.
var sch = "http://schemas.microsoft.com/cdo/configuration/";
var cdoConfig = Server.CreateObject("CDO.Configuration");
cdoConfig.Fields.Item(sch & "sendusing") = 2;
cdoConfig.Fields.Item(sch & "smtpserver") = "smtp.xyz.co.uk";
cdoConfig.Fields.Update();
var cdoMessage = Server.CreateObject("CDO.Message");
cdoMessage.Configuration = cdoConfig;
cdoMessage.From = "[email protected]";
cdoMessage.To = "(e-mail address removed)";
cdoMessage.Subject = sSubject;
cdoMessage.TextBody = sBody;
cdoMessage.Send();
Any help appreciated.
Regards,
NEIL