Converting from System.Web.Mail to System.Net.Mail

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nathan Sokalski

    Converting from System.Web.Mail to System.Net.Mail

    I am moving an application that involves sending email from 1.1 to 2.0. I am
    attempting to convert the email-sending code from System.Web.Mail to
    System.Net.Mail . I think I have most of this accomplished, but I am trying
    to find the System.Net.Mail equivelant of
    System.Web.Mail .MailMessage.Bo dyFormat. In the past, I used code such as the
    following to specify whether the message was html or text:

    mymessage.BodyF ormat = Mail.MailFormat .Html

    However, I cannot find a property of the System.Net.Mail .MailMessage class
    that specifies this. What do I do to specify html or text? Thanks.
    --
    Nathan Sokalski
    njsokalski@hotm ail.com
    有声小说网为广大读者提供热门小说在线免费阅读,本站收集的网络文学小说情节跌宕起伏,有声小说网是值得书友们收藏的小说在线阅读网。



  • Jacob

    #2
    Re: Converting from System.Web.Mail to System.Net.Mail

    I think you're supposed to use myMessage.IsBod yHtml = true;

    Nathan Sokalski wrote:
    I am moving an application that involves sending email from 1.1 to 2.0. I am
    attempting to convert the email-sending code from System.Web.Mail to
    System.Net.Mail . I think I have most of this accomplished, but I am trying
    to find the System.Net.Mail equivelant of
    System.Web.Mail .MailMessage.Bo dyFormat. In the past, I used code such as the
    following to specify whether the message was html or text:
    >
    mymessage.BodyF ormat = Mail.MailFormat .Html
    >
    However, I cannot find a property of the System.Net.Mail .MailMessage class
    that specifies this. What do I do to specify html or text? Thanks.
    --
    Nathan Sokalski
    njsokalski@hotm ail.com
    http://www.nathansokalski.com/

    Comment

    • Master Programmer

      #3
      Re: Converting from System.Web.Mail to System.Net.Mail

      I think that System.Net.Mail is going to be depreciated in 3.0, the
      new syntax is going to be System.Net.Web. Net.Mail. Then a few months
      after that to break all compatibility it will be changed again to
      System.Net.NewM ail. Then a couple of months later it will be changed
      again to System.Mail.Mai ler.NewMail, just in case anyone got used to
      the old way.

      If you can hang on a year or two, then you can avoid all of these
      changes. As its quite likely that they will just kill the language and
      bring out a new completely different one.

      I heard from an insider that the next big thing is going to be called
      "DNA-Universe". They decided that everything they made is shite and we
      have all been doing things the wrong way - and to "unlearn everything".


      The Grand Master



      Nathan Sokalski wrote:
      I am moving an application that involves sending email from 1.1 to 2.0. I am
      attempting to convert the email-sending code from System.Web.Mail to
      System.Net.Mail . I think I have most of this accomplished, but I am trying
      to find the System.Net.Mail equivelant of
      System.Web.Mail .MailMessage.Bo dyFormat. In the past, I used code such as the
      following to specify whether the message was html or text:
      >
      mymessage.BodyF ormat = Mail.MailFormat .Html
      >
      However, I cannot find a property of the System.Net.Mail .MailMessage class
      that specifies this. What do I do to specify html or text? Thanks.
      --
      Nathan Sokalski
      njsokalski@hotm ail.com
      http://www.nathansokalski.com/

      Comment

      • Sugan

        #4
        Re: Converting from System.Web.Mail to System.Net.Mail

        Can you stop repeating these annoying posts. If you are not interested
        in VB .Net, please leave the group. Why in this world you bother about
        other programmers?

        Master Programmer wrote:
        I think that System.Net.Mail is going to be depreciated in 3.0, the
        new syntax is going to be System.Net.Web. Net.Mail. Then a few months
        after that to break all compatibility it will be changed again to
        System.Net.NewM ail. Then a couple of months later it will be changed
        again to System.Mail.Mai ler.NewMail, just in case anyone got used to
        the old way.
        >
        If you can hang on a year or two, then you can avoid all of these
        changes. As its quite likely that they will just kill the language and
        bring out a new completely different one.
        >
        I heard from an insider that the next big thing is going to be called
        "DNA-Universe". They decided that everything they made is shite and we
        have all been doing things the wrong way - and to "unlearn everything".
        >
        >
        The Grand Master
        >
        >
        >
        Nathan Sokalski wrote:
        I am moving an application that involves sending email from 1.1 to 2.0. I am
        attempting to convert the email-sending code from System.Web.Mail to
        System.Net.Mail . I think I have most of this accomplished, but I am trying
        to find the System.Net.Mail equivelant of
        System.Web.Mail .MailMessage.Bo dyFormat. In the past, I used code such as the
        following to specify whether the message was html or text:

        mymessage.BodyF ormat = Mail.MailFormat .Html

        However, I cannot find a property of the System.Net.Mail .MailMessage class
        that specifies this. What do I do to specify html or text? Thanks.
        --
        Nathan Sokalski
        njsokalski@hotm ail.com
        http://www.nathansokalski.com/

        Comment

        • Master Programmer

          #5
          Re: Converting from System.Web.Mail to System.Net.Mail

          No, I most certainly will not. I will continue for as long as I choose.
          How dare you try to tell me what to do.

          The Grand Master


          Sugan wrote:
          Can you stop repeating these annoying posts. If you are not interested
          in VB .Net, please leave the group. Why in this world you bother about
          other programmers?
          >
          Master Programmer wrote:
          I think that System.Net.Mail is going to be depreciated in 3.0, the
          new syntax is going to be System.Net.Web. Net.Mail. Then a few months
          after that to break all compatibility it will be changed again to
          System.Net.NewM ail. Then a couple of months later it will be changed
          again to System.Mail.Mai ler.NewMail, just in case anyone got used to
          the old way.

          If you can hang on a year or two, then you can avoid all of these
          changes. As its quite likely that they will just kill the language and
          bring out a new completely different one.

          I heard from an insider that the next big thing is going to be called
          "DNA-Universe". They decided that everything they made is shite and we
          have all been doing things the wrong way - and to "unlearn everything".


          The Grand Master



          Nathan Sokalski wrote:
          I am moving an application that involves sending email from 1.1 to 2.0. I am
          attempting to convert the email-sending code from System.Web.Mail to
          System.Net.Mail . I think I have most of this accomplished, but I am trying
          to find the System.Net.Mail equivelant of
          System.Web.Mail .MailMessage.Bo dyFormat. In the past, I used code such as the
          following to specify whether the message was html or text:
          >
          mymessage.BodyF ormat = Mail.MailFormat .Html
          >
          However, I cannot find a property of the System.Net.Mail .MailMessage class
          that specifies this. What do I do to specify html or text? Thanks.
          --
          Nathan Sokalski
          njsokalski@hotm ail.com
          http://www.nathansokalski.com/

          Comment

          • Spam Catcher

            #6
            Re: Converting from System.Web.Mail to System.Net.Mail

            "Sugan" <vsugan@gmail.c omwrote in news:1165918179 .909134.177000@
            73g2000cwn.goog legroups.com:
            Can you stop repeating these annoying posts. If you are not interested
            in VB .Net, please leave the group. Why in this world you bother about
            other programmers?
            He does have a point ... Remoting is another example.

            Comment

            Working...