Visual Basic Development Bookmark and Share   
 Home > Visual Basic Language > Email RichTextFormat
 

Email RichTextFormat

Experienced with sending ASCII using System.Net.Mail and but need help with sending rich text formated. Adding .IsBodyHtml = true just concatenates, no formatting. Examples in MSDN documentation are all in C# if there is an applicable. Appreciate some direction.
Ed
Ed Bitz  Monday, August 17, 2009 1:28 PM

Here's a MSDN post regarding your issue that might assist. Offers a few solutions:
http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/7bef80f3-0b0c-43bf-a971-698f67a42321

  • Marked As Answer byEd Bitz Tuesday, August 18, 2009 11:41 PM
  •  
EricEric  Monday, August 17, 2009 7:04 PM
Hello Ed Bitz

For this first you convert RTF to HTML body of mail and send it.

And on recive site you convert HTML To RFT body of mail and show it.

  • Marked As Answer byEd Bitz Tuesday, August 18, 2009 11:41 PM
  •  
Navaratan  Tuesday, August 18, 2009 1:24 PM
I don't have an answer but a suggestion for the C# examples. A tool I have used in the past (working between C# and VB.NET).

It converts C# to VB.NET:

http://www.developerfusion.com/tools/convert/csharp-to-vb/



EricEric  Monday, August 17, 2009 2:29 PM

Eric - I can use that and in this case it did determine that the VB8 syntax for BodyEncoding was "MyMailMsg.BodyEncoding = System.Text.Encoding.UTF8". HoweverI found the example only handled HTML intpu; my RTF sent from a RichTextBox still got mailed unformatted.

Ed Bitz  Monday, August 17, 2009 5:25 PM

Here's a MSDN post regarding your issue that might assist. Offers a few solutions:
http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/7bef80f3-0b0c-43bf-a971-698f67a42321

  • Marked As Answer byEd Bitz Tuesday, August 18, 2009 11:41 PM
  •  
EricEric  Monday, August 17, 2009 7:04 PM
Hello Ed Bitz

For this first you convert RTF to HTML body of mail and send it.

And on recive site you convert HTML To RFT body of mail and show it.

  • Marked As Answer byEd Bitz Tuesday, August 18, 2009 11:41 PM
  •  
Navaratan  Tuesday, August 18, 2009 1:24 PM

Sorry I responded to Eric promptly but goofed somehow and it went into never never land.

The submission for which Eric found the reference was exactly my problem - wanting to send RTF. The solutions offered there suggest that there may be no direct approach. Two used other programs as starting points, Outlook and Word and the third required converting to HTML. The latter is a viable solution for my particular need where we, in our retired community, use a program to automatically send three batches of 95 each, ASCII messages to our membership (to avoid spam limits of our ISP). I would like to send formatted but not do the formatting - cut and paste from submission from members, typically in Word. However I have tried that and a converted Word document to HTML loses it formatting (the third example given displayed nothing); however I can created my own HTML document and it sends find. But again, in our case the postmaster does not do the formatting and I cannot get the garbaged HTML that Word creates to send properly.

I'll continue to struggle with using HTML, as Navaratan also suggested. Will try with a simple Text box and my sending source rather than a Rich Text Box.

Ed Bitz  Tuesday, August 18, 2009 6:30 PM
The work around, or maybe just the correct approach, that works is to take a Word submission where formatting is important such as bold, color, font size, and convert to html, then send. However I have not been able to accomplish using the converter in Word (convert to Web page) but found a free ware called Word to HTML Converter 3.35, the output of which, can be sent successfully.
Ed Bitz  Tuesday, August 18, 2009 7:47 PM

You can use google to search for other answers

Custom Search

More Threads

• Me.activecontrols not working
• String to unique integer ID
• Inserting or drawing objects during runtime
• Groupbox
• Finding Length of an Real Media Audio File
• TreeView Control Arrays
• Program Execution from desktop
• Populate a ListBox with data filtered by a ComboBox?
• Decimals?
• How to escape double quotes (") in tab delimited text file ? Urgent - please any idea is welcome