Xheader & WinMail.dat

S

shubhangi

Hello
I've added xheader to outgoing message.When the message contains
Attachment,it is sent as
winmail.dat.I tried to set UseTNEF to false but still attachement is not
being sent properly
code is
Private Sub AvoidWinmailAttachment(ByVal MailItem As Outlook.MailItem)
Dim sItem As Object
Dim Tag
sItem = CreateObject("Redemption.SafeMailItem")
sItem.Item = MailItem
Tag = sItem.GetIDsFromNames("{00062008-0000-0000-C000-000000000046}",
"UseTNEF")
'{00062008-0000-0000-C000-000000000046}, 0x8582, PT_BOOLEAN
Tag = Tag Or &HB
sItem.Fields(Tag) = False
sItem.Subject = sItem.Subject 'to trick Outlook into thinking that
something has changed
sItem.Save()
End Sub
AvoidWinmailAttachment is called in Application_ItemSend event after
AddXheader.
Code is run without any errors.
What else I need to do?
Thanks
 
K

Ken Slovak - [MVP - Outlook]

Winmail.dat is sent when you are sending Rich Text (RTF) messages, it's used
to encapsulate the RTF envelope. Are you sending in Rich Text format? You
can set BodyFormat to either plain text or HTML and see if that helps:

item.BodyFormat = Outlook.OlBodyFormat.olFormatPlain; // or olFormatHTML
 
S

shubhangi

Thanks ,it worked
Ken Slovak - said:
Winmail.dat is sent when you are sending Rich Text (RTF) messages, it's
used to encapsulate the RTF envelope. Are you sending in Rich Text format?
You can set BodyFormat to either plain text or HTML and see if that helps:

item.BodyFormat = Outlook.OlBodyFormat.olFormatPlain; // or olFormatHTML
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top