Attachment sent over SMTP

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm developing an Outlook add-in in VB using VS 2005 and VSTO 2005 SE. I use
a custom form that creates a new MailItem and I attach a file to it by the
add-in. If my Outlook email account is configured as a POP/SMTP client, the
recipient of the email receives a file called Winmail.dat instead of the
attachment. Interestingly, if the Outlook email account is setup as an
Exchange server client, then the attachment is received correctly by the
recipient.

How can I achieve the attachment to be sent correctly over an SMTP server?
Any idea would be appreciated.

Thanks,

Istvan
 
That sounds like you're sending in Rich text format to non-Outlook
recipients. That causes winmail.dat. Send in plain text or HTML format.
 
Thank you Ken for your comment. I had actually read the articles about
Outlook attaching formating information in Winmail.dat, but I tested again
after your note just to double check myself. However, I believe that my
problem is a different one.

My custom form, that I use to create the MailItem, has user defined fields,
which, if I understand correctly, will force Outlook to attach the
Winmail.dat file, even if I send the message in a plain text format (I check
the MailItem..BodyFormat property in the MailItem.Send event and in addition,
my Outlook Tools -> Options -> Mail Format tab -> Compose in this message
format is set to "Plain Text").

The problem is that if I attach a file to the message on the sender side and
send it through an SMTP server, the attached file will be embedded into the
Winmail.dat on the recipient side. (I can see this if I attach a plain text
file and open the Winmail.dat file on the recipient side in a text editor.
Besides the text of he attached file, Winmail.dat obviously has some binary
information.)

I don't mind that Winmail.dat is attached to the message on the recipient
side. However, I would like to have the file that was attached on the sender
side to show up on the recipient side as it was attached. (i.e not embedded
in Winmail.dat.)
 
If the recipient is an Outlook user then they never will see winmail.dat,
Outlook understands that file. If the use isn't using Outlook you can't
avoid them seeing winmail.dat if you send them a custom form. Your choices
are to not use a custom form or to live with them getting winmail.dat and
not being able to do anything with it.
 
In my company we have this issue right now and I beg to differ on some of the responses. We have an exchange server inhouse and a mail server hosted on the outside via POP accounts. When a user in my facility sends an email through the POP account and back in house we recieve winmail.dat. If we send through our exchange, we will not recieve the winmail attachment. If we send an email to and outside address they will not recieve winmail either. Is is only recieved when someone sends an attachment or HTML formatted email from their outlook through the pop account and back inside to our accounts. The POP mail does not touch our exisiting inhouse exchange. The outside email hosting software in Modus mail. We are all using Outlook 2003 in house and still recieving our emails stripped with the winmail.dat attachement. Most of us are using HTML format for emails. I have read that we can change to plain text, but no one wants to do that. It makes the emails so unpersonable.

EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com
 
Back
Top