开发者

Embedding HTML into an email via MAPI32

I have a program in C# that has a call:

myEmail.SendMailPopup("Hi", "This is my email body");

which uses MAPI32.DLL to open an Outlook email with the subject of Hi and a body of This is my email body.

However开发者_StackOverflow社区, when I send it HTML, such as

myEmail.SendMailPopup("Hi", "<html><body><b>Bold text</b></body></html>");

the message body contains what it literally in the quotation marks.

Is there a way to parse this HTML to show "Bold text" in bold?

Thanks.


I'm not sure that is possible. You might want to check out the Microsoft.Office.Interop.Outlook option. Just found a good example.


Since SendMailPopup is not a MAPI32.dll method that I'm aware of, is there anyway to share the internals of what SendMailPopup does? Does it by chance encode the message in anyway?

Doesn't MAPI32.DLL assume

[DllImport("MAPI32.DLL")]
static extern int MAPISendMail(IntPtr sess, IntPtr hwnd, MapiMessage message, int flg, int rsv);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜