0
我試圖打開Outlook窗體與身體發送消息。 當我與我的本地工作完全開放。但是,當我使用IIS的Outlook窗口不打開。新Outlook窗口在IIS中使用C#
public static void SendMailInOutlook(Page CurrentPage, Type ScriptType,
string Subject, string Recipients, Dictionary<string, string> emailInputs,
string emailTemplatePath)
{
static Microsoft.Office.Interop.Outlook.Application outlookApp;
static Microsoft.Office.Interop.Outlook._MailItem mailItem;
outlookApp = new Microsoft.Office.Interop.Outlook.Application();
mailItem = (Microsoft.Office.Interop.Outlook._MailItem)outlookApp.CreateItem(
Microsoft.Office.Interop.Outlook.OlItemType.olMailItem);
mailItem.Subject = Subject;
mailItem.To = Recipients;
mailItem.HTMLBody = SendMail.GetEmailContent(emailInputs, emailTemplatePath);
Thread newThread = new Thread(SendEmailToOutLook);
newThread.Start();
}
static void SendEmailToOutLook()
{
string sMsg = "Email sent successfully.";
try
{
mailItem.Display(true);
}
catch (Exception ex)
{
sMsg = ex.Message;
}
}
我需要通過HTML表單在這個喜歡...我如何通過HTML表單中HREF鏈接? – sarathkumar 2014-09-24 08:01:31
HTML表單在電子郵件中做了什麼? – Alexander 2014-09-24 10:36:35
像我需要傳遞的HTML形式因爲我需要加載一些默認設計的身體..像Dashing邊框顏色和填充的話..所以這是如何可能..以前我只嘗試過這一個,但當我通過HTML表單腳本無法正常工作.... – sarathkumar 2014-09-25 06:31:25