I have an agent sending an automated email to an external address. The email is to include a hyperlink (you know, something like: click here ). Everything works except for the hyperlink - it is being sent as text rather than being treated as HTML.
I am testing this with a Yahoo mail (web based) account. When I “view source” it appears that the < is being translated to “<” and the > is being translated to “>”
How can I prevent this? I think what I need is an Escape Character but don’t know the HTML Escape.
Assuming your text is being placed in the body field of the memo - you can apply a rtichtextstyle to the body where it is treated as passthruHTML - which if your code is formatted correctly - should appear and work as expected
I was using @MailSend, not LotusScript, to send the memo. If I have to I will rewrite the entire agent, but I suspect that will not help.
I actually did use square brackets to indicate passthru HTML, but it did not help. To further my testing I sent an email with the HTML typed into the body of an email sent from a third party webemail client. (The HTML is good if I save it as an HTML page/doc and view it thru a browser). I had the same result - View Source shows my ‘code’ being translated to “<” or “>”.
This makes it look like I need an HTML escape character rather than a Domino escape.
I think the mistake here is the idea to send HTML. A lot of people recaeive email just as plain text (and I think this is very good that way, html can do nasty things in your email client).The usual email clients (such as outlook express and notes) will present a text that looks like an URL as an URL. It’s the mail client that does the trick, not the email.
In notes it’s a setting in the user preferences to do that, please don’t ask me about OE.
I would simply send the text URL except for two things:1) Domino URLS are typically quite long and as such, may end up on two lines in the email client. This could break the URL and when the user clicks they get only part of the URL. Not to mention, it looks pretty ugly (not very reader friendly)to have such a long URL.
I am also mailing Notes:// URLs. Neither Notes nor Outlook nor any of the web email clients recognize Notes:// as looking like a URL. If they were embedded into a hyperlink instead, then the hyperlink says ‘launch me with a browser’ and the browser knows what to do with “Notes://”. So in this case, I need the email to do the trick as the client can’t.
This may be a case where you either want to use a third party product or create the MIME yourself. If you want to create the MIME yourself, look at the NotesMIMEntity classes and generate HTML for everything instead of rich text. If you want to be able to use rich text but still have Notes URLs and long http URLs work, take a look at our Midas Rich Text LSX, which can make a clean conversion between rich text and HTML, can convert the URLs automatically, and can send the MIME out in such a way that the links are clickable.