代码发出电子邮件并且工作正常但由于某种原因它不会出现高度重要性。我做错了什么。
Option Explicit On
Imports System.IO
Imports System.Net.Mail
Module SendMail
Sub SendMessage()
Dim olApp As Object
Dim olMail As Object
Dim olNs As Object
Dim Priority As MailPriority
olApp = CreateObject("Outlook.Application")
olNs = olApp.GetNamespace("MAPI")
olMail = olApp.CreateItem(0)
With olMail
olMail.To = "" '// Add recipient
olMail.Cc = ""
olMail.Bcc = ""
olMail.Subject = "New File "
olMail.HTMLBody = "Your File is Ready " & Format(Now, "Long Date")
olMail.Attachments.Add = " " '// Add attachments to the message.
olMail.Priority = MailPriority.High '// High importance
olMail.Send()
End With
olMail = Nothing
olApp = Nothing
olNs = Nothing
End Sub
End Module
答案 0 :(得分:2)
尝试使用System.Net.Mail命名空间进行发送。
示例:
<VerticalLayout>
<HBox> FIELD1 & FIELD2 here </HBox>
<HBox> FIELD3 & FIELD4 here </HBox>
<Image> IMAGE here </Image>
</VerticalLayout>
答案 1 :(得分:2)
从example gist看一下,似乎没有if($_POST[q1] && $_POST[q2] && $_POST[q5]){
echo 'something';
}elseif($_POST[q3] && $_POST[q5]){
echo 'something again';
}elseif($_POST[q3] && $_POST[q5]){
echo 'something again again';
}
and so on...
属性(您尝试设置)。请尝试设置MSDN documentation for Outlook 2013's MailItem
class。
...或者如果您不需要Outlook功能,只想发送邮件,只需使用.NET自己的the Importance
property发送邮件。