Author |
|
Jangla Newbie
Joined: 18 June 2007 Location: United Kingdom
Online Status: Offline Posts: 9
|
Posted: 18 June 2007 at 8:44am | IP Logged
|
|
|
I'm using Objects to act as a very advanced auto-responder for a system we are building at work. The format of the emails it will be dealing with are uniform (as they come from a web form submission) but the message text is Base64 encoded.
For some reason, mailBee neglects to pass the correct portion of the email into BodyPlainText. Rather than it recognising the bondaries and just getting the actual message body, it gets the whole lot including the "This is a multi-part message in MIME format." bits.
Any ideas?
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 18 June 2007 at 10:24am | IP Logged
|
|
|
Actually, it's not clear what exactly you're doing, even which component is in use (Pop3, Imap, Smtp).
Could you describe the problem in more detail and submit the piece of the source code in question?
Also, regarding base64 encoded message text. Is it the input which comes from web form? I.e. you put base64 data into Smtp.Message.BodyPlainText? Or, you put non-encoded message text into BodyPlainText and set Smtp.Message.MailTransferEncodingPlain to MailTransferEncoding.Base64? Or, something else?
Regards,
Alex
|
Back to Top |
|
|
Jangla Newbie
Joined: 18 June 2007 Location: United Kingdom
Online Status: Offline Posts: 9
|
Posted: 19 June 2007 at 1:26am | IP Logged
|
|
|
I'm using the IMAP component and the email does indeed come from a web form - it arrives on our server in base64.
The code I'm using is:
MailMessage msg = new MailMessage();
msg.LoadMessage(@"C:\pathtofile\emailfile.msg");
Email incomingEmail = new Email();
incomingEmail.from = msg.From.ToString();
incomingEmail.to = msg.To.ToString();
incomingEmail.subject = msg.Subject.ToString();
incomingEmail.message = msg.BodyPlainText.ToString();
At this point I would expect incomingEmail.message to contain only the email body but when looking at it, it contains "This is a multi-part message in MIME format.
------------part_1_466f215b6c1c5
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: base64" before the message itself and everything else you would expect to be excluded.
|
Back to Top |
|
|
Jangla Newbie
Joined: 18 June 2007 Location: United Kingdom
Online Status: Offline Posts: 9
|
Posted: 19 June 2007 at 4:21am | IP Logged
|
|
|
Don't worry - sorted it.
|
Back to Top |
|
|