|
我不能send email by coding。我不能用smtp client send email.请问是什么原因??以下是我的coding,
Try
Dim smtp_client As New SmtpClient
Dim mailMsg As New MailMessage
Dim fromAdd As New MailAddress("pooh@yahoo.com", "kelly")
smtp_client.Host = "192.168.168.5"
smtp_client.Port = 25
mailMsg.From = fromAdd
mailMsg.To.Add("andy@yahoo.com")
mailMsg.Subject = "Activation Code"
mailMsg.IsBodyHtml = False
mailMsg.Body = "Activation Code= " & TxtEncrypt.Text
smtp_client.Send(mailMsg)
Panel3.Visible = False
Panel2.Visible = True
Catch ex As Exception
MsgBox(ex.Message)
End Try |
|