1

我有发送电子邮件的代码:

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 发送电子邮件时,有没有办法提到“高重要性”?我附上了一封高重要性电子邮件的图片在此处输入图像描述。就像我想在这里做的那个红色感叹号一样?

4

2 回答 2

2

omail.Priority = MailPriority.Low

参考:http: //msdn.microsoft.com/en-us/library/system.web.mail.mailmessage.priority.aspx

于 2013-08-18T11:24:00.040 回答
1

MailMessage 类中有一个 Priority 属性,您可以使用以下枚举填充它: High Low Normal

因此,您可以将其设置为:

omail.Priority = MailPriority.High
于 2013-08-18T11:23:26.833 回答