[求助]web上利用system.web.email发送邮件实现不了
在web上发送email,怎么发不了呢?程序可以运行,但在邮箱里收不到呀,请高手指点:
代码如下;
Imports System.Web.Mail
Public Class SendEmail
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSendEmail.Click
Dim objMail As New MailMessage()
objMail.From = Me.txtFrom.Text.ToString
objMail.To = Me.txtTo.Text.ToString
objMail.Subject = Me.txtSubject.Text.ToString
objMail.Body = Me.txtMessage.Text.ToString
objMail.BodyFormat = MailFormat.Html
SmtpMail.Send(objMail)
end sub
end class