I am working on an application with xpages.I would like to send emails with that contain links. When I send the link, it does not appear in clickable format.Can someone help me to have clickable format? Thank you
var db = session.getCurrentDatabase();
var memo = db.createDocument();
memo.appendItemValue("Body","http://www.my_link.com");
memo.appendItemValue("Form", "Memo");
memo.appendItemValue("Subject", "New task !");
var t = mail.getValue();
memo.send(t);
If you are hoping that the statement
memo.appendItemValue("Body","http://www.my_link.com");
will create a rich text field with link then it won't. For that useNotesRichTextItem
class. You could also look into this Technote on how to create HTML formatted mail messages.One question here, where will the recipient would be viewing this mail? In Notes client or this mail would be sent to IDs like Gmail or Yahoo? If recipient would be viewing this mail in Lotus Notes then you would have to enable this setting in your Notes client.
Go to
File > Preferences > Basic Notes Client Configuration
. Under the sectionAdditional options
enable the settingMake Internet URLs (http://.......) into Hotspots
.If the mail is being sent to IDs like Gmail or Yahoo then you would be at their mercy on how links are displayed. But in my experience they always display links, if they are in valid format.
If you do it like this, the "Body"- Item is a simple Text- Item and not a Richtext- Item. Text- Items cannot contain clickable links.
You have to explicitly define Body as a NotesRichtextItem and append text to it:
This way the link will automatically be converted to a clickable hotspot.