的身體,我可以使用此代碼到我的Exchange服務器添加多行SMTP電子郵件VB.NET
Try
Dim SmtpServer As New SmtpClient
Dim mail As New MailMessage
SmtpServer.Credentials = New Net.NetworkCredential()
SmtpServer.Port = 25
SmtpServer.Host = "email.host.com"
mail = New MailMessage
mail.From = New MailAddress("[email protected]")
mail.To.Add("[email protected]")
mail.Subject = "Equipment Request"
mail.Body = "This is for testing SMTP mail from me"
SmtpServer.Send(mail)
catch ex As Exception
MsgBox(ex.ToString)
End Try
但我怎麼可以添加多行到身體上發送電子郵件?
用多行準備字符串消息並將其添加到body屬性中時出現什麼問題? – Steve 2012-04-23 15:23:52