MailMessage & mime encoded SMTP data

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • asnowfall@gmail.com

    #1

    MailMessage & mime encoded SMTP data

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

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

    1) MailMessage.Bod y = Convert(byteMai lData);
    If I do the above, will MailMessage object extract the Message
    BODY, Message HEADER and Attachments automatically.

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


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

    Thanks
    Ramesh

  • Peter Bromberg [C# MVP]

    #2
    RE: MailMessage & mime encoded SMTP data

    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

    --
    Co-founder, Eggheadcafe.com developer portal:

    UnBlog:





    "asnowfall@gmai l.com" wrote:
    [color=blue]
    > I am trying to build System.Mail.Mai lMessage object out of mime encoded
    > SMTP data. I have following questions
    >
    > Byte[] byteMailData; //mime encoded STMP data for "email with
    > attachment"
    >
    > 1) MailMessage.Bod y = Convert(byteMai lData);
    > If I do the above, will MailMessage object extract the Message
    > BODY, Message HEADER and Attachments automatically.
    >
    > 2) Can MailMessage.Att achemnt() understand MIME encoded attachment
    > data?
    >
    >
    > 3) Is there a .Net class to decode MIME data?
    >
    > Thanks
    > Ramesh
    >
    >[/color]

    Comment

    • asnowfall@gmail.com

      #3
      Re: MailMessage & mime encoded SMTP data

      Thank you
      Ramesh

      Comment

      Working...