CDO を使用してフォームの詳細を電子メールで送信する ASP ページがあります。これまでのところ、hmail サーバーへのクリア接続を介して smtp ポート 25 を使用してこれを行ってきました。
ここで、SSL 接続を使用する必要があります。セキュリティ証明書を作成し、ポート 465 と ssl を使用するように hmail サーバーを設定しました。
しかし、フォームを送信しようとすると、何らかの理由でエラー 500 が表示され、メールが送信されません。
ポート 587 でも試しましたが、どちらも機能しません。
私が使用する CDO コードは次のとおりです。
If request.Form("submit") <> "" then
Set myMail=CreateObject("CDO.Message")
myMail.Subject="xxxxxxx"
myMail.From=Request.Form("email")
myMail.To= "xxxxxxxxxxx"
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
誰が何が間違っているのか考えていますか?
ありがとうございました。