Dim mailMsg As New MailMessage Dim sToMailAdd as string = "[email protected];[email protected]" '这个收信人列表你可以循环生成 ' setting a few properties. With mailMsg .From = "[email protected]" .To = sToMailAdd .Subject = "hello" .Body = "hello." End With ' Set the SmtpServer name. SmtpMail.SmtpServer = "10.245.245.10" 'smpt 你要自己设置了 'Send Mail SmtpMail.Send(mailMsg)
Dim sToMailAdd as string = "[email protected];[email protected]" '这个收信人列表你可以循环生成
' setting a few properties.
With mailMsg
.From = "[email protected]"
.To = sToMailAdd
.Subject = "hello"
.Body = "hello."
End With ' Set the SmtpServer name.
SmtpMail.SmtpServer = "10.245.245.10" 'smpt 你要自己设置了 'Send Mail
SmtpMail.Send(mailMsg)