我是 VB 的新手,但我在网上寻找了一些片段。这就是我发现的,一切都编译好了,并且电子邮件地址是正确的,但我得到“服务不可用,正在关闭传输通道。服务器响应是:(空白)”。注意:我在那里放了一个虚拟电子邮件。
'Check the humanity of the submitter
If strhumanity = "Aggies" Then
' Send Email
Using message As New MailMessage()
message.From = New MailAddress(ourEmail.ToString())
message.[To].Add(New MailAddress("sephoroth@yahoo.com")) 'Change back to gerald's email
message.Subject = "Ecampus Isses"
message.Body = body
Dim client As New SmtpClient()
client.Host = "eforms.tamug.edu" 'Change back
client.Send(message)
Server.Transfer("ThankYou.aspx", True)
End Using
Else
Response.Write("You do not seem to be human. Try again.")
'exit
End If