Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET Objects

 AfterLogic Forum : MailBee.NET Objects
Subject Topic: Base64 emails Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Jangla
Newbie
Newbie


Joined: 18 June 2007
Location: United Kingdom
Online Status: Offline
Posts: 9
Posted: 18 June 2007 at 8:44am | IP Logged Quote Jangla

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 View Jangla's Profile Search for other posts by Jangla
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 18 June 2007 at 10:24am | IP Logged Quote Alex

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 View Alex's Profile Search for other posts by Alex
 
Jangla
Newbie
Newbie


Joined: 18 June 2007
Location: United Kingdom
Online Status: Offline
Posts: 9
Posted: 19 June 2007 at 1:26am | IP Logged Quote Jangla

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 View Jangla's Profile Search for other posts by Jangla
 
Jangla
Newbie
Newbie


Joined: 18 June 2007
Location: United Kingdom
Online Status: Offline
Posts: 9
Posted: 19 June 2007 at 4:21am | IP Logged Quote Jangla

Don't worry - sorted it.
Back to Top View Jangla's Profile Search for other posts by Jangla
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide