MailMessage & mime encoded SMTP data

  • Thread starter Thread starter asnowfall
  • Start date Start date
A

asnowfall

I am trying to build System.Mail.MailMessage object out of mime encoded
SMTP data. I have following questions

Byte[] byteMailData; //mime encoded STMP data for "email with
attachment"

1) MailMessage.Body = Convert(byteMailData);
If I do the above, will MailMessage object extract the Message
BODY, Message HEADER and Attachments automatically.

2) Can MailMessage.Attachemnt() understand MIME encoded attachment
data?


3) Is there a .Net class to decode MIME data?

Thanks
Ramesh
 
Ramesh,

You could not do 1) because you would not be able to assign byteMailData,
which represents an entire message including attachment to just the body
property of a Mailmessage.
For 2), yes the attachment should understand this. I say "should' Because I
am not 100% sure.

For 3) , yes there are custom libraries that encode / decode MIME, but they
are provided by third parties. I have seen at least 2 that are free and
open-source.
Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top