[英]How to Open New Mail Windows on Default Email Application(outlook) to send email on button click
我有一种将Outlook作为默认电子邮件应用程序打开的方法,但是问题是,不应使用每个填充的邮件信息提示“撰写新窗口”。
public void SentEmail()
{
string strTo = "abc@gmail.com";
string strSubject = "Outlook Automation";
Outlook.Application app =new Outlook.Application();
Outlook.MailItem mItem = app.CreateItem(Outlook.OlItemType.olMailItem);
mItem.To = strTo;
mItem.Subject = strSubject;
mItem.BodyFormat = Outlook.OlBodyFormat.olFormatHTML;
mItem.HTMLBody = "<div>Hello</div>";
}
任何人都可以帮我解决这个问题吗?
在这里: http : //csharp.net-informations.com/communications/csharp-smtp-mail.htm,您有一个很好的C#电子邮件发送示例。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.