gpt4 book ai didi

email - 使用经典 ASP 发送邮件?

转载 作者:行者123 更新时间:2023-12-04 18:08:48 27 4
gpt4 key购买 nike

我正在尝试使用经典 ASP 发送邮件,但我的页面包含一些错误,这就是为什么上传页面显示错误:

500 Internal Server Error

这是我正在使用的代码;

<%
Dim smtpserver,youremail,yourpassword,ContactUs_Name,ContactUs_Tel,ContactUs_Email
Dim ContactUs_Subject,ContactUs_Body,Action,IsError

smtpserver = "smtp.gmail.com"
youremail = "xxxxx.yyyyyy@gmail.com"
yourpassword = "password"

Dim ObjSendMail
Set ObjSendMail = CreateObject("CDO.Message")
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 587
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = 1 'Use SSL for the connection
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = "aaaaa.bbbbbb@gmail.com"
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password"
ObjSendMail.Configuration.Fields.Update
ObjSendMail.To = "aaaaa.bbbbbb@gmail.com"
ObjSendMail.CC = "cccccc.dddddd@sunarctechnologies.com"
ObjSendMail.Subject = "Subject"
ObjSendMail.From = "xxxxx.yyyyyy@gmail.com"
ObjSendMail.HTMLBody = "<p>hello</p>"
ObjSendMail.Send
Set ObjSendMail = Nothing
%>

我对经典的 asp 没有任何概念,这只是从其他来源复制粘贴代码。

最佳答案

您的代码看起来正确,但我会检查 gmail 是否只接受端口 465 上的 SSL 连接。我相信端口 567 用于 TLS 连接。或者,只需尝试端口 25。

This question is similar to yours .

您还确实需要能够查看您的应用程序报告的详细错误消息。

关于email - 使用经典 ASP 发送邮件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19727197/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com