forwarded email message gets some headers inserted into body

Giganews Newsgroups
Subject: forwarded email message gets some headers inserted into body
Posted by:  Michael Johnson (architeuthis6…@yahoo.com)
Date: Thu, 3 Aug 2006

I have written a program in Visual C++ .NET using Indy 10.1.5.0 which POPs messages from a mailbox, appends some extra text to the message (either to the body or to each text message part as appropriate), then forwards the message to a new address. This was working fine for me but at some point--not certain exactly when--I started getting extra stuff in my message parts that look like headers, for example:

This is a multi-part message in MIME format.

--tq7hGk0mVfGqiBE1a6g7q17L=_SxTGw7QJ
Content-Type: text/plain
Content-Transfer-Encoding: binary

Content-Disposition=inline            <--- weird stuff
Content-Length=521
Content-Transfer-Encoding=binary
Content-Type=text/plain

Test message

-------------------------------------------
Text I appended to a test message

--tq7hGk0mVfGqiBE1a6g7q17L=_SxTGw7QJ
Content-Type: text/html
Content-Transfer-Encoding: binary

Content-Disposition=inline            <--- same thing in html part
Content-Length=714
Content-Transfer-Encoding=binary
Content-Type=text/html

[snip]

Does anyone have any clue what might be causing this? I hesitate to post source code because it's bulky, but suffice to say I have carefully checked and the message part text does not seem to contain this stuff -- it seems to somehow get added by the SMTP Send function.

Mike

Replies