传输无法连接到Classic ASP中的服务器

时间:2017-08-15 18:57:46

标签: asp-classic

我想发送消息但是我收到此错误。有谁知道我为什么会收到这个错误?

On Error Resume Next
    mTo = "*****"


            mBody = "<strong>New Signup</strong><br><br> " & _
                    "Time: " & now() &  "<br><br> "

    If (mTo <> "") Then
        Set objMail = Server.CreateObject("CDO.Message")
        With objMail
            .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 ' SendUsingPort
            .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.*****.ca" ' Name or IP of remote SMTP server
            .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 ' Server port
            .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpConnectionTimeout") = 60
            .Configuration.Fields.Update
            .From = "Home Style - New Signup <info@******.ca>"
            .To = mTo
            .Subject = "Home Style - New Signup" 
            .HTMLBody = mBody
            .Send
        End with
        set objMail = nothing
    End If

    If Err.Number <> 0 Then

     Response.Write (Err.Description)   

     Response.End 

请告诉我丢失某些代码的位置。

1 个答案:

答案 0 :(得分:0)

看起来您正在尝试使用身份验证,但您并未发送登录详细信息。

请参阅https://stackoverflow.com/a/6500470/5544752了解详情