Sending URL link to either Notes Client mail or web mail

Using LotusScript, I’m sending an automated message containing a URL to a particular user. Some of our users have Notes 5 clients, some have Notes 6 clients, some have MS Outlook and some use a third-party web-based email system. I’m trying to script the body of my email so that the URL will be interpreted correctly by all.

My script works for the web-mail users but not for the Notes Mail users; the Notes Mail users get plain text instead of a working URL link.

Here’s part of my script:

docsurvey.Form = “Memo”

docsurvey.SendTo = source.FieldGetText( “UserName” )

docsurvey.Subject = “Help Desk Survey”

bodymsg$ = | Please take time to answer the attached survey … |

bodylink$ = “http://”

docsurvey.Body = bodymsg$ & Chr(13) & Chr(10) & Chr(13) & Chr(10) & “Click here to launch survey:” & Chr(13) & Chr(10) & Chr(13) & Chr(10) & bodylink$ & Chr(13) & Chr(10)

Call docsurvey.Send( False )

Any suggestions for scripting this so that the URL is a clickable link for any mail client?

Subject: Sending URL link to either Notes Client mail or web mail

Check this out

Dim s As New NotesSession

Dim mime As NotesMimeEntity

Dim html As NotesStream



Set db = s.CurrentDatabase

sHTML = YOUR HTML CODE AND LINK HERE

'Set up the Memo

recipients = doc.publisher(0)

cTo = getCopyTo(doc,currentlog)

Set memo = New notesdocument(db)

memo.form = “Memo”

memo.Subject = “Your Text”

memo.sendTo = recipients

memo.CopyTo = cTo

memo.ReplyTo = doc.Approver(0)

'Now we have the HTML and memo - we parse the HTML to conver to MIME and insert into the body

THIS IS THE IMPORTANT PART

Set html = s.CreateStream

html.WriteText sHTML

Set mime = memo.CreateMIMEEntity(“Body”)

mime.SetContentFromText tml,“text/html”,ENC_NONE

Call memo.Send(False)

And that should do it

HTH

Subject: This worked quite well. Thanks!