Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. mailMsg.BodyFormat

mailMsg.BodyFormat

Scheduled Pinned Locked Moved ASP.NET
toolshtmlcomtestinghelp
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    padmanabhan N
    wrote on last edited by
    #1

    Hi Experts, In my applicaition User will be receiving mail through the applicaiton to Outlook and Lotus Notes. Now the problem is the applications sents the mail with the formatted text to the plain mail or to the Lotus Notes. Now my requirement is if it is sending to the Outlook then it must be a HTML and if it is sending to the Lotus Notes then it must be a plain text. Any idea is much appreciated.

    Padmanabhan My Articles: Articles[^] My latest Article: Word Automation[^]

    N 1 Reply Last reply
    0
    • P padmanabhan N

      Hi Experts, In my applicaition User will be receiving mail through the applicaiton to Outlook and Lotus Notes. Now the problem is the applications sents the mail with the formatted text to the plain mail or to the Lotus Notes. Now my requirement is if it is sending to the Outlook then it must be a HTML and if it is sending to the Lotus Notes then it must be a plain text. Any idea is much appreciated.

      Padmanabhan My Articles: Articles[^] My latest Article: Word Automation[^]

      N Offline
      N Offline
      NeverHeardOfMe
      wrote on last edited by
      #2

      And what if the Outlook user has set it to read email in plain text format? You cannot control how users will read their email, nor even determine what method they use to do so. You need to send your emails in multi-part form - an HTML part and a plain text part - and let the email client determine which to use. See here[^] for guidance.

      P 1 Reply Last reply
      0
      • N NeverHeardOfMe

        And what if the Outlook user has set it to read email in plain text format? You cannot control how users will read their email, nor even determine what method they use to do so. You need to send your emails in multi-part form - an HTML part and a plain text part - and let the email client determine which to use. See here[^] for guidance.

        P Offline
        P Offline
        padmanabhan N
        wrote on last edited by
        #3

        Thanks for you help! I have used the link which is provided by you and sent a mail to both Outlook and Lotus Notes, both are same mail with no chages. //if Lotus Notes AlternateView plainView = AlternateView.CreateAlternateViewFromString("This is my plain text content, viewable by those clients that don't support html", null, "text/plain"); //if Outlook AlternateView htmlView = AlternateView.CreateAlternateViewFromString("<b>this is bold text, and viewable by those mail clients that support html</b>", null, "text/html"); This is not happening. I am getting only the HTML message on both the cases

        Padmanabhan My Articles: Articles[^] My latest Article: Word Automation[^]

        N 1 Reply Last reply
        0
        • P padmanabhan N

          Thanks for you help! I have used the link which is provided by you and sent a mail to both Outlook and Lotus Notes, both are same mail with no chages. //if Lotus Notes AlternateView plainView = AlternateView.CreateAlternateViewFromString("This is my plain text content, viewable by those clients that don't support html", null, "text/plain"); //if Outlook AlternateView htmlView = AlternateView.CreateAlternateViewFromString("<b>this is bold text, and viewable by those mail clients that support html</b>", null, "text/html"); This is not happening. I am getting only the HTML message on both the cases

          Padmanabhan My Articles: Articles[^] My latest Article: Word Automation[^]

          N Offline
          N Offline
          NeverHeardOfMe
          wrote on last edited by
          #4

          I am not sure exactly what you are doing, but you need to send both "views" (HTML and plain text) as part of the same email - if you have done that and you are seeing the HTML view in Lotus Notes then I can only assume that is because that instance of Lotus Notes is set up to read HTML emails. You cannot force it to read the plain text view in your code.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups