![]() |
Sending CDO email messages using SSL
Hello,
I have an ASP form that sends emails using CDO and HMail server. So far, I have done this using port 25 and a clear connection. However, I now need to use SSL to send the emails. I have configured HMail server to use port 465 and ssl. I have also changed the code of the CDO message to use ssl. However, when I try to send a message an error 500 occurs. The code for the CDO message is below: If request.Form("submit") <> "" then Set myMail=CreateObject("CDO.Message") myMail.Subject="xxxxxxxxx" myMail.From=Request.Form("email") myMail.To= "xxxxxxxxx" myMail.TextBody = "Name:"& Request.Form("name")& vbcrlf & vbcrlf & _ "Email:" & Request.Form("email") & vbcrlf & vbcrlf & _ "Telephone:" & Request.Form("telephone") & vbcrlf & vbcrlf & _ "Location:" & Request.Form("location") & vbcrlf & vbcrlf & _ "Other location:" & Request.Form("other_location") & vbcrlf & vbcrlf & _ "Comments:" & Request.Form("comments") myMail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendusing")=2 'Name or IP of remote SMTP server myMail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserver") _ ="127.0.0.1" 'Server port myMail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") _ =465 MyMail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True myMail.Configuration.Fields.Update myMail.Send set myMail=nothing What I am doing wrong? Thank you. |
| All times are GMT +1. The time now is 04:07 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.