tags:

views:

944

answers:

4

Hi,

I have a piece of code which sends e-mails using a third party e-mail sending component.

When the e-mails are delivered, the HTML which should be appearing in the body of the e-mail is also being added as an attachment with the filename ATT00001.

I suspect the attachment is being created by the receiving e-mail server (which in this case is Exchange 2007).

My question is - does anybody know why this is happening? I suspect some sort of character set problem, but I'm not really sure.

Any help would be appreciated!

+1  A: 

When you forward an email, it can be "inline" - in the body of the new email, or as an "attachment" - attached as a file to the new email.

Now I am not sure about your question. You say "instead" in the title, and "also" in the main content. But I suspect that whatever issue is with the e-mail component you have, not Exchange. Check the API for specifying how the email is forwarded: inline, attached, or both.

Ali A
Thanks - I've clarified the question. The e-mail isn't being forwarded, though - it's a brand new e-mail that's being sent for the first time. Any other thoughts?
Chris Roberts
That's how forwarding works.
Ali A
A: 

Only time I get this is when i set charset:unicode instead of charset:utf-8 somewhere but it may be completely unrelated. Telling us more about the external component would certainly allow for better answers.

mike nvck
A: 

It may well be the work of Outlook MUA at the receiving end. This looks interesting. Perhaps if you could send emails to a different receiving MTA and MUA, things may narrow down a bit.

ayaz
A: 

Look at the source of the received e-mail. If it has Content-Type: multipart/mixed; boundary=----------whatever, it is a text e-mail with attachment. If it has Content-Type: multipart/alternative; boundary="----something", it is an HTML message correctly set to have a textual alternative (for clients not handling HTML or set to ignore it).

I doubt the server changes this kind of stuff (but who know?), I would look at your component instead.

In doubt, if you have no other tool to see what is sent, you might try and use WireShark to capture the SNMP message and see what it looks like. A bit of an overkill but I am not familiar with other tools... :-) I used its ancestor, Ethereal, to debug and optimize IMAP requests.

PhiLho