我正在尝试发送电子邮件,因为该托管支持经典的asp所以我设法获取邮件的asp代码,但我得到一些错误,即“需要对象!”或“权限被拒绝!” 我怎么能修复它plz帮助代码:
On Error Resume Next
Set Mail = CreateObject("CDO.Message")
Mail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
Mail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="smtp.gmail.com"
Mail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465
Mail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = 1
Mail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
Mail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
Mail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") ="arthur.dent@example.com"
Mail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="H34rt0fG01d"
Mail.Configuration.Fields.Update
Mail.Subject="Subject"
Mail.From="arthur.dent@example.com"
Mail.To="ford.prefect@example.com"
Mail.TextBody="This is Body!"
Mail.Send
Set Mail = Nothing
If Err.Number <> 0 Then
Response.Write(Err.Description)
End If
这是我正在使用的链接: http://www.realfashionstreet.com/v/vspfiles/Fortest.asp