padlake
asked on
Trying CDO.Message with Windows Hosted Network Solutions, no error, no e-mail is sent?
I have used CDO.Message many times with providers (1 and 1, ReadyHosting), but have never had this experience.
I have a "tell a friend" script I am using, but for some reason, I don't get an error but the e-mail is not sent.
Code attached.
I have a "tell a friend" script I am using, but for some reason, I don't get an error but the e-mail is not sent.
Code attached.
Set Mail = Server.CreateObject("CDO.Message")
Set objConfig = Server.CreateObject("CDO.Configuration")
'Configuration:
objConfig.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtpserver -- verified"
objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25
objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate")=1
objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "user@domain"
objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password"
objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
'Update configuration
objConfig.Fields.Update
Set Mail.Configuration = objConfig
Mail.From = "valid and verified e-mail address"
Mail.To = strEmail
Mail.Subject = strSubject
strBody = "A message from: " & strSenderEmail & "<br><br>I am sending this to you because I believe this is a website you should check out!<br><br>"
Mail.HTMLBody = strBody
On Error Resume Next
Mail.Send
If Err.Number <> 0 Then
Response.Write "An error encountered: " & Err.Description & "<br>"
Else %>
Thank you for your help in getting our message out!<br><br> Click Back on your browser or <a href="tell_a_friend.asp">click here to send another e-mail.</a>
<% End If
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If it seems to be successfully delivering to an SMTP server we will need to check the SMTP logs to determine what happened to the message.
Chris