Hello Experts ..
I have this code which successfully sends email if i use our SMTP server.If external or public like gmail is used it wont work.. I would like to know how can we modify it to send email using public SMTP servers as well.
SMTPServer = "mx1.*****.com"
Recipient = "email@example.com"
From = "firstname.lastname@example.org"
Subject = "Test email"
Message = "This is the email subject"
GenericSendmail SMTPserver, From, Recipient, Subject, Message
Sub GenericSendmail (SMTPserver, From, Recipient, Subject, Message)
set msg = WScript.CreateObject("CDO.Message")
msg.From = From
msg.To = Recipient
msg.Subject = Subject
msg.TextBody = Message
msg.Configuration.Fields ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = SMTPServer
msg.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
Thank you much for looking into this ..