BodybrilliantMike
Perch
I was successfully sending authenticated mail via Cdosys, but something odd is up and I hope someone may have had the same problem and can advise.
I can send with the from property set to basically any account, but can only send to a email address that exists in the email account on the mail server.
'-------------------------------------------------
'NOTE I have tried cdoBasic, 0,1,2 in the authentication string
Dim CDOSYSCon
'Create the e-mail server object
Set CDOSYSMail = Server.CreateObject("CDO.Message")
Set CDOSYSCon = Server.CreateObject("CDO.Configuration")
'Out going SMTP server
CDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.MYDOMAIN"
CDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
CDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
CDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
CDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 0
CDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "ACTIVE MAIL ACCOUNT"
CDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "PASSWORDFOR MAIL ACCOUNT"
CDOSYSCon.Fields.Update
'Set key properties
Set CDOSYSMail.Configuration = CDOSYSCon
CDOSYSMAIL.To = EMAILADDRESSFROMDATASET
CDOSYSMail.From = "[email protected]"
CDOSYSMail.Subject = "This Message Subject"
CDOSYSMail.HtmlBody = htmlmail 'msg created earlier on page
CDOSYSMail.Send
'Close the server mail object
Set CDOSYSMail = Nothing
Set CDOSYSCon = Nothing
'--------------------------------------------
If anyone could shed some light I'd really appreciate it. I thought the authentification would be regulating the mail from rather than mail to...
Thanks
Mike
I can send with the from property set to basically any account, but can only send to a email address that exists in the email account on the mail server.
'-------------------------------------------------
'NOTE I have tried cdoBasic, 0,1,2 in the authentication string
Dim CDOSYSCon
'Create the e-mail server object
Set CDOSYSMail = Server.CreateObject("CDO.Message")
Set CDOSYSCon = Server.CreateObject("CDO.Configuration")
'Out going SMTP server
CDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.MYDOMAIN"
CDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
CDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
CDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
CDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 0
CDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "ACTIVE MAIL ACCOUNT"
CDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "PASSWORDFOR MAIL ACCOUNT"
CDOSYSCon.Fields.Update
'Set key properties
Set CDOSYSMail.Configuration = CDOSYSCon
CDOSYSMAIL.To = EMAILADDRESSFROMDATASET
CDOSYSMail.From = "[email protected]"
CDOSYSMail.Subject = "This Message Subject"
CDOSYSMail.HtmlBody = htmlmail 'msg created earlier on page
CDOSYSMail.Send
'Close the server mail object
Set CDOSYSMail = Nothing
Set CDOSYSCon = Nothing
'--------------------------------------------
If anyone could shed some light I'd really appreciate it. I thought the authentification would be regulating the mail from rather than mail to...
Thanks
Mike