从将HTML转换为RTF停止展望 [英] Stop Outlook from converting HTML to RTF

查看:189
本文介绍了从将HTML转换为RTF停止展望的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在写一个附加在Outlook 2007中,一切工作正常,除非我发送HTML格式的邮件,Outlook将其转换为RTF。因此,如果收件人打开它如。雷鸟他得到,而不是格式良好的HTML我发了靠不住看短信。

I'm writing an add-in for Outlook 2007. Everything works fine except when I send an email in HTML format, Outlook converts it to RTF. So if the recipient opens it in eg. Thunderbird he gets a wonky looking text message instead of the nicely formatted html I sent.

Outlook.MailItem theMail = (Outlook.MailItem)((Outlook.Application)Globals.ThisAddIn.Application).CreateItem(Outlook.OlItemType.olMailItem);
Outlook.Recipient rcp = theMail.Recipients.Add("joe blow <joe@blow.com>");
rcp.Type = (int)Outlook.OlMailRecipientType.olTo;
theMail.HTMLBody = <html composed elsewhere>
theMail.BodyFormat = Outlook.OlBodyFormat.olFormatHTML;

我如何说服展望,我真的想HTML?

How do I convince Outlook that I really do want html?

编辑 行 - 我发现这里的问题<一href="http://social.msdn.microsoft.com/Forums/en-US/outlookdev/thread/97456678-6c29-449e-a07a-fa8c6c27164b"相对=nofollow>在MSDN 我加入一个用户属性

EDIT OK - I found the problem here at MSDN I'm adding a user property

Outlook.UserProperty prop = theMail.UserProperties.Add("theQuoteId", Outlook.OlUserPropertyType.olText);
prop.Value = quote.qid.ToString();

根据文章的属性不能映射到MIME头和Outlook投到RTF。

According to the article the property cannot be mapped to the mime headers and Outlook throws it into RTF.

所以,我的下一个问题是要弄清楚如何将唯一的标签添加到邮件,所以我可以在以后连接到数据库。任何想法?

So my next problem is to figure out how to add an unique tag to the message so I can link it to a database later. Any ideas?

推荐答案

你设置的消息的任何用户属性?

Do you set any user properties on the message?

如果你看一下Outlook邮件在发送邮件文件夹与 OutlookSpy (点击即时聊天按钮)你看到的UseTnef命名的属性(DASL名的http://schemas.microsoft.com/mapi/id/{00062008-0000-0000-C000-000000000046}/8582000B)?

If you look at the Outlook message in the Sent Items folder with OutlookSpy (click IMessage button), do you see the UseTnef named property (DASL name http://schemas.microsoft.com/mapi/id/{00062008-0000-0000-C000-000000000046}/8582000B)?

这篇关于从将HTML转换为RTF停止展望的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆