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.microso ft.com/cdo/configuration/";
var cdoConfig = Server.CreateOb ject("CDO.Confi guration");
cdoConfig.Field s.Item(sch & "sendusing" ) = 2;
cdoConfig.Field s.Item(sch & "smtpserver ") = "smtp.xyz.co.uk ";
cdoConfig.Field s.Update();
var cdoMessage = Server.CreateOb ject("CDO.Messa ge");
cdoMessage.Conf iguration = cdoConfig;
cdoMessage.From = "info@.xyz.co.u k";
cdoMessage.To = "test@abc.co.uk ";
cdoMessage.Subj ect = sSubject;
cdoMessage.Text Body = 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.microso ft.com/cdo/configuration/";
var cdoConfig = Server.CreateOb ject("CDO.Confi guration");
cdoConfig.Field s.Item(sch & "sendusing" ) = 2;
cdoConfig.Field s.Item(sch & "smtpserver ") = "smtp.xyz.co.uk ";
cdoConfig.Field s.Update();
var cdoMessage = Server.CreateOb ject("CDO.Messa ge");
cdoMessage.Conf iguration = cdoConfig;
cdoMessage.From = "info@.xyz.co.u k";
cdoMessage.To = "test@abc.co.uk ";
cdoMessage.Subj ect = sSubject;
cdoMessage.Text Body = sBody;
cdoMessage.Send ();
Any help appreciated.
Regards,
NEIL
Comment