I'm using MailEnable as my email server. It is the relay setting causing the error.
Currently, I only allow authenticated sender to send emails..
And I can send email to myself (firstname.lastname@example.org).
It wouldn't allow to send email to external email service such as yahoo or hotmail
Then I edit the relay setting to "allow local address senders" to send emails. Everything works fine.
If allow this option, then I will have a security issue. I have learned my lesson well, people used my email server to send spam emails.
what are the ways to go around it? Thanks.
Here is the ASP code that autosends email..
sch = "http://schemas.microsoft.com/cdo/configuration/
Set cdoConfig = Server.CreateObject("CDO.C
cdoConfig.Fields.Item(sch & "sendusing") = 2
cdoConfig.Fields.Item(sch & "smtpserver") = "<mail.mydomain.com>"
Set cdoMessage = Server.CreateObject("CDO.M
Set cdoMessage.Configuration = cdoConfig
cdoMessage.From = "email@example.com"
cdoMessage.To = "firstname.lastname@example.org"
cdoMessage.Subject = "Sample CDONTS NewMail"
cdoMessage.TextBody = "This is a test for CDONTS message"
Set cdoMessage = Nothing
Set cdoConfig = Nothing
response.write "Email sent"