System.Web.Mail.MailMessage.headers

Discussion in 'ASP .Net' started by stuart, Nov 10, 2003.

  1. stuart

    stuart Guest

    Hi,

    Can anybody tell me if it is possible to add your own headers through this
    class.
    The documenttion seems to be a bit ambiguous, for example the overview of
    the methods says

    Specifies the custom headers that are transmitted with the e-mail message.

    but the property is read only

    [Visual Basic]
    Public ReadOnly Property Headers As IDictionary

    I wish to change the headers to specify a html part and a plain text part,
    The headers I wish to add/change are
    Content-Type: multipart/alternative;

    boundary="----=_NextPart_000_0005_01C3A604.321346F0"


    cheers

    martin.
     
    stuart, Nov 10, 2003
    #1
    1. Advertising

  2. stuart

    Jacky Kwok Guest

    stuart wrote:
    > Hi,
    >
    > Can anybody tell me if it is possible to add your own headers through this
    > class.
    > The documenttion seems to be a bit ambiguous, for example the overview of
    > the methods says
    >
    > Specifies the custom headers that are transmitted with the e-mail message.
    >
    > but the property is read only
    >
    > [Visual Basic]
    > Public ReadOnly Property Headers As IDictionary
    >
    > I wish to change the headers to specify a html part and a plain text part,
    > The headers I wish to add/change are
    > Content-Type: multipart/alternative;
    >
    > boundary="----=_NextPart_000_0005_01C3A604.321346F0"
    >
    >
    > cheers
    >
    > martin.
    >
    >
    >


    You can add your header.

    e.g. C# code
    message.Headers.Add("Content-Transfer-Encoding","base64");


    ////
    The "Headers" is ReadOnly means that you cannot assign a new "Headers"
    colloection object to it. However, you can add values to the existing
    header collection.


    --
    Jacky Kwok

     
    Jacky Kwok, Nov 10, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bertus Dam
    Replies:
    5
    Views:
    880
    Bertus Dam
    Aug 29, 2003
  2. martin
    Replies:
    5
    Views:
    2,121
    Hans Kesting
    Dec 19, 2003
  3. techie
    Replies:
    3
    Views:
    2,623
    Phil Wilson
    May 12, 2004
  4. =?Utf-8?B?TWlja2VCb3k=?=

    Problem with System.Web.Mail.MailMessage and HTML mail

    =?Utf-8?B?TWlja2VCb3k=?=, Jun 15, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    924
    =?Utf-8?B?TWlja2VCb3k=?=
    Jun 21, 2005
  5. Replies:
    8
    Views:
    602
Loading...

Share This Page