Link to home
Start Free TrialLog in
Avatar of Michael Williams
Michael WilliamsFlag for United States of America

asked on

Lotusscript: Send External Email with Formatting - Sends Text Only

I need to send an email to an external email address with formatting. Unfortunately, the Bold and etc styling is removed and the received email is only text.

Any ideas how I can make the following send an email with the body containing a Font Size of 18 and is Bold?

	Dim session As NotesSession
	Dim dbCurrent As NotesDatabase
	Dim docMail As NotesDocument
	Dim rtBody As NotesRichTextItem
	Dim rtsMemoStyle As NotesRichTextStyle
	
	Set session = New NotesSession
	Set dbCurrent = session.currentDatabase	
	Set rtsMemoStyle = session.CreateRichTextStyle
	
	Set docMail = dbCurrent.CreateDocument
	docMail.Form = "Memo"
	docMail.Subject = "TEST"
	docMail.SendTo = "test@test.com"
	docMail.Body = ""
	Set rtBody = New NotesRichTextItem( docMail, "Body" )
	rtsMemoStyle.NotesFont = FONT_COURIER
	rtsMemoStyle.FontSize = 18
	rtsMemoStyle.Bold = True
	Call rtBody.AppendStyle( rtsMemoStyle )
	Call rtBody.AddNewLine( 16 )
	Call rtBody.AppendText( "TESTTESTTESTTESTTESTTEST" )
	Call rtBody.AddNewLine( 8 )
	Call rtBody.AppendText( "TESTTESTTESTTESTTEST" )
	Call rtBody.AddNewLine( 8 )
	Call rtBody.AppendText( "TESTTESTTESTTESTTESTTEST" )
	docMail.Send( False )

Open in new window

Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

You have to use the NotesMimeEntity class. You can use it to put HTML based formatting in your mail.

See:
- http://ozinisle.blogspot.com/2010/11/send-html-content-as-mail-using-lotus.html
- https://www-01.ibm.com/support/docview.wss?uid=swg21098323
ASKER CERTIFIED SOLUTION
Avatar of Michael Williams
Michael Williams
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
100% correct, if all you need is the courrier font and bold characters. As that was your question, I think I owe you an apology.
Avatar of Michael Williams

ASKER

All good. I always appreciate your help.