歡迎光臨 pure C# 技術社群. 登入註冊

pure C# 技術社群

- Microsoft .NET Framework 相關技術非官方討論社群 -

為何我在local測試寄mail可以,但是丟到server上會出現could't not access o(無法存取 'CDO.Message)錯誤?

  • 1
  • [第1/1頁 共2項]
#1

為何我在local測試寄mail可以,但是丟到server上會出現could't not access o(無法存取 'CDO.Message)錯誤?

  • a
 0.0 (0 人評價)

無法存取 'CDO.Message' 物件。
這是我用的程式碼

On Error Resume Next
   SmtpMail.SmtpServer = "msa.hinet.net"
   SmtpMail.Send(mail)



後來我改成這種

 Try 
          SmtpMail.SmtpServer = "msa.hinet.net" 
          SmtpMail.Send(mail)
          Catch Err As Exception  

          Response.Write(Err.Message)  
          End Try
          mail = Nothing
If Err.Number <> 0 Then
            Msg.Text = Err.Description
         Else
         showMessage(me," 密碼已經送出,請檢查您的信箱 !")
         End If

本機測試一樣ok可以收到信...
server現在不會出錯了,但是卻收不到信=  =(有出現mail已經送出的訊息)
請問各位大大這是怎麼回事?


  • 回覆
  • |
  • 引用
  • |
  • 編輯
  • |
  • 私人訊息


贊助商連結

#2

Re: 為何我在local測試寄mail可以,但是丟到server上會出現could't not access o(無法存取 'CDO.Message)錯誤?

  • a
 0.0 (0 人評價)
hi 你好
可以驗查一下server的防火牆設定是否可走SMTP (port 25)
另一種可能就是server的權限設定無法執行web以外的服務

  • 回覆
  • |
  • 引用
  • |
  • 編輯
  • |
  • 私人訊息
  • 1
  • [第1/1頁 共2項]