I want to email the contents of a rich text field and send an URL link in the same document.
When I send the rich text field through the mime code it does not maintain the spacing of the original text. I am using the mime code to send the URL link because I want to send the link with the format of <a href="www.nameOfDocument.com">Click Here</a> so that the long URL text does not show. The email should look like this:
Rich text field comments should appear on the first line:
Click Here(second line a link without showing the long URL)
Thanks for any help.
here is my code:
mailDoc.Form = "Memo2"
Set html = session.CreateStream
mailDoc.Subject = "Take a look at this webpage I found.. "
Dim rtbody As NotesRichTextItem
Set rtbody = New NotesRichTextItem(mailDoc, "Body")
Dim rtitem As NotesRichTextItem ' *****************
Set rItem = doc.getfirstitem("personalMessage")
Call rtbody.AppendRTItem (rItem)
Set mime = mailDoc.CreateMIMEEntity("Body")
Call mime.SetContentFromText(html, "text/html; charset=iso-8859-1", ENC_QUOTED_PRINTABLE)
html.WriteText("Click on the link below to view this page:")
html.WriteText(|<a href="| + doc.link(0)+|"> |+ title +|</a>|)
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!