弱弱的问大家一个小白问题!
rrra9 2007-05-17 12:55:37 请问大家如何在web中发email呢,以前很早我一本书中看到的是这样一来的,直接导入
Import Namespace="System.Web.Util 然后编写对应的按钮事件,不过发现不管用。
Sub btnSend_Click(Sender As Object, e As EventArgs)
Dim Mail As New MailMessage
Dim SendMail As New SmtpMail
Mail.To=txtReceiver.Text
Mail.From=txtConsigner.Text
Mail.Subject=txtSubject.Text
Mail.Body=txtContent.Text
SendMail.Send(Mail)
lblMessage.Text="信件传送成功"
End Sub
昨天又看其他资料说要设置smtp才行, 是否真的如此.上面的代码是林辉彰书中写的,也算很有名了,为何根本没提设置smtp呢?