我有发送电子邮件的代码:
Try
Dim SmtpServer As New SmtpClient()
SmtpServer.Credentials = New Net.NetworkCredential("jasibs002@gmail.com", "solutions")
SmtpServer.Port = 25
SmtpServer.Host = "smtp.gmail.com"
SmtpServer.EnableSsl = True
Dim omail As New MailMessage()
omail.From = New MailAddress("jasibs002@gmail.com", "JaseemBinBacker", System.Text.Encoding.UTF8)
omail.Subject = "test subject"
omail.Body = "Hai How Are You I am Sendig This Mail for Testing"
' omail.To.Add("jaseem@ibsdubai.ae")
omail.To.Add(txtEmail.Text)
SmtpServer.SendAsync(omail, Nothing)
Catch ex As Exception
MsgBox(ex.ToString)
End Try
这项工作正常,但向outlook发送电子邮件是否有任何提及“高重要性”的方法?我附上一张高重要性电子邮件的图片。就像那个红色的感叹号,我想在这里做什么?
答案 0 :(得分:2)
omail.Priority = MailPriority.Low
参考:http://msdn.microsoft.com/en-us/library/system.web.mail.mailmessage.priority.aspx
答案 1 :(得分:1)
MailMessage类中有一个Priority属性,您可以使用以下枚举填充: 高 低 正常
所以你可以把它设置为:
omail.Priority = MailPriority.High