Dim email As New MailMessage
email.BodyFormat = MailFormat.Text
email.From = "[email protected]"
email.To = "[email protected]"
email.Subject = "MySubject"
email.Body = "ccc"
email.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1")
email.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "[email protected]") 'SMTP 用户
email.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "mypassword") 'SMTP 密码
email.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserver", "192.168.4.1") 'SMTP服务器
Try
System.Web.Mail.SmtpMail.Send(email) Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
email.BodyFormat = MailFormat.Text
email.From = "[email protected]"
email.To = "[email protected]"
email.Subject = "MySubject"
email.Body = "ccc"
email.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1")
email.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "[email protected]") 'SMTP 用户
email.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "mypassword") 'SMTP 密码
email.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserver", "192.168.4.1") 'SMTP服务器
Try
System.Web.Mail.SmtpMail.Send(email) Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
可以支持群发,像smtp这种基于文本的应用层协议,通过抓包软件就可以分析协议的流程。
然后写成自己的程序就行了。