的身体,我可以使用此代码到我的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