Sending Link Message to internet recipient

We are using Notes/Domino for a bunch of internally created databases, but Outlook for email. (don’t get me started)

When my co-worker sends a link message (Create - Mail - Special - Link Message) from a Notes document to an internet (Outlook) recipient, it opens in Outlook as a working link. The word Link is formatted as a hyperlink, clicking it opens the proper document, and the underlying source is a proper Notes URL. We like this!

When I (the sole Notes/Domino developer) do the same thing, I just get evidence that there had been a Notes Doclink that Outlook cannot work with.

I’m not sure what settings I should potentially be looking at. I have not found any technotes or prior questions here. Help?

Thanks, Lori

Subject: sending Link Message to internet recipient

Just curious - where did you get the ‘link message’ form? We’re in a similar boat (Notes for apps, Exchange/Outlook for mail) and running 6.5.4 and I don’t see an option for ‘link message’.

Also - what is the hyperlink? A Notes URL (notes://whatever) or a web url (http://notesserver/whatever)?

Do you have any code running on the server intended to handle doc links (ala CoexLinks)?

Do you have your Outlook set to convert everything to text or are you configured for HTML or Rich Text mail? Your Outlook settings can cause all kinds of interesting phenomenon.

Doug

Subject: RE: sending Link Message to internet recipient

Doug, Had to go search the code- :wink: the use of the word link in the code is not a hyper link. The code creates a file with a “ndl” extension, which has to be associated with LN by the OS. (Dreaded Windows, of course) the format of the NDL file is in my previous post. I am trying to find where I got the bulk of the code from - normally I comment it in to the code, but didn’t here. :frowning: In another part of the code, I attach the file link.ndl to the outgoing e-mail. I actually look at the NAB to determine who is using Outlook and who prefers LN. Then send a notes link to the LN user and this to the Outlook user. Our use of Outlook will increase, we just got bought by a Fortune 100 company. But they are incredibly impressed w/ our LN apps and I am hopeful we will move some of them “up the tree”.

[edit] Found this link on IBM Developer

Still trying to find where I got the code.

[EDIT 2] found it- it was in the sand box. http://www-10.lotus.com/ldd/sandbox.nsf/ByApplicationName/bd1fb2a844a8496c8525686500609253?OpenDocument

Hope that helps Doug.

thomas at thsassociates dot net

Tom

Subject: RE: sending Link Message to internet recipient

I probably started with the same source for our .NDL attachments. One big thing we have discovered: if you are saving the attachment (temporarily, so it can be sent) to a local drive, the only warning that the folder doesn’t exist (we have users who cannot write to the root of C:) is a “Fiel not found” error that appears when they trigger the Send functionality. The email is not sent if the attachment is not found.

Subject: RE: sending Link Message to internet recipient

Okay- answers / questions. My internet mail format is mime and no link goes. :frowning: On the some times working NDL file- the user gets an error, says something like “I can’t find it” - at first I thought it might be that the error was only happening at our Carolina plant ( way the heck away down a “T” from here), but then my fellow IT guy in the next office got it- “Invalid directory name or device not ready” - that is the error. And he has access to the database. In fact, it opens the database.

 I actually didn't like the idea of writing to the C:\ so, that is why I have code in their to put it in their temp directory.  They always have write access to that.  And I will develop a unique name, because notes won't overwrite an existing file.

Subject: sending Link Message to internet recipient

We have Outlook/Exchange and I have been working on code w/ some help from a variety of places to include doc links that can be opened in outlook- I am having about 50% success with the following code- When I tried your method, Outlook had less of an idea there was a link there then ever. :frowning:

Anyway, I call this function from post save- I haven’t quite figured out why it works for some users and not others.

the code creates a “Ndl” file that contains this:

<REPLICA 852574F7:00510A6B>

CN=Excalibur/OU=HQ/O=SRS

The code that creates the link is:

so, it is a place for you to start in programming links. As I say, it works for about 50% of our users and I have put it on the shelf for the moment. If people see the issue please do tell.

Function OLLink

Dim ws As New NotesUIWorkspace

Dim s As New NotesSession  'Declare session as a new Notes session

Dim db As NotesDatabase 

Dim uidoc As NotesUIDocument

Dim Thisdoc As NotesDocument

Dim item As NotesItem

Dim recMessage As Variant ' Variable for mail Recipient

Dim ThisdocID As String  ' Variable to hold document Universal ID

Dim ReplicaID As String  ' Variable used to build Replica ID line in .NDL file

Dim HintServer As String  ' Variable used to build hint server line in .NDL file

Dim ViewID As String  ' Variable used to build view line in .NDL file

Dim NoteID As String  ' Variable used to build document line in .NDL file



Set db = s.CurrentDatabase  'Set db to the current Notes database (open)  

Set uidoc = ws.Currentdocument

Set Thisdoc = uidoc.document



 ' Verify that the document current exist in the database

If Thisdoc.IsNewNote Then

      ' Document has not been saved, warn user and exit routine

	Msgbox "This document has not been saved." & Chr$(10) & Chr$(10) & "Please save prior to mailing link!", 4112, "New Document"

	Exit Function

Else 

      ' Lets get the documents I.D. and E-mail data

	ThisdocID = Thisdoc.UniversalID

	Set item = Thisdoc.GetFirstItem( "SupervisorCalc" )

	recMessage = item.values(0)

End If



 ' Lets ensure that user is not attempting to send a link of a local database

If db.server = "" Then

      ' This is a local database and mailed link will not work, warn user and exit routine

	Msgbox "You are not allowed to send a link of a local database", 4112, "Local Links Not Allowed"

	Exit Function

Else

      ' Build Replica line for .NDL file format = <REPLICA 8525643D:0069F618>

	ReplicaID="<REPLICA " & Left$(db.ReplicaID, 8) & ":" & Right$(db.ReplicaID, 8) & ">"

End If



ViewID = ""

 ' Lets verify that a default view exist in this database as a view handle is need for the .NDL file

Forall x In db.Views    'Use ForAll to loop through each view in the database until the default is found

	If x.IsDefaultView Then   'Test each view to see if it is the default view

           ' Build View line for .NDL file format = <VIEW OF0BA62705:23C5A6D0-ON8525643D:006A3AA7>

		ViewID = "<VIEW OF" & Left$(x.UniversalID, 8) &":"&Mid$(x.UniversalID, 9, 8)&"-"&"ON"&Mid$(x.UniversalID, 17, 8)&":"&Right$(x.UniversalID, 8)&">"          

		Exit Forall 'Once the default view is found, break out of the loop

	End If

End Forall



 ' Lets ensure that our view handle for the .NDL file was built

If ViewID = "" Then  

      ' View handle was never built so link would give a view error, warn user and exit routine

	Msgbox "This database does not contain a default view." & Chr$(10) & Chr$(10) & "Please contact your database manager!",  4112, "Default View Not Found"

	Exit Function

End If



 ' Build Note line for .NDL file format = <NOTE OFBCF13ED6:621BCDE2-ON852566B7:006D7E14>

NoteID = "<NOTE OF" & Left$(docID, 8) &":"&Mid$(docID, 9, 8)&"-"&"ON"&Mid$(docID, 17, 8)&":"&Right$(docID, 8)&">" 

 ' Build Hint Server line for .NDL file format = <HINT>CN=FTLNSDEV/OU=DEV/O=FTG</HINT>

HintServer = "<HINT>"& db.server &"</HINT>"

fileNum% = Freefile()

 ' Assign a file name for the .NDL file that we will be mailing

Dim tempPath



If Environ$("tmp") <> "" Then

	tempPath = Environ$("tmp")

Else

	tempPath = Environ$("temp")

End If



Print "Method 1 - tempPath=" + tempPath

%REM

Dim retval As Long

Dim buf As String * 512



retval = GetTempPath(512, buf)

Print "Method 2 - tempPath=" + bufDim tempPath

%END REM

If Environ$("tmp") <> "" Then

	tempPath = Environ$("tmp")

Else

	tempPath = Environ$("temp")

End If



fileName$ = TempPath & "\link.ndl"



 ' Write out link data to C:\link.ndl

Open fileName$ For Output As fileNum%

Print #fileNum%, "<NDL>"

Print #fileNum%, ReplicaID

Print #fileNum%, HintServer

Print #fileNum%, ViewID

Print #fileNum%, NoteID

Print #fileNum%,  "</NDL>"

Close fileNum%

End Function

Subject: RE: sending Link Message to internet recipient

Tom -

When we originally switched email from Notes to Outlook, I “retro-fitted” @MailSend formulas that sent automated notifications to users into triggered agents that saved and attached .ndl files to an email. Those are fine. (I can go back and read through your code and see if I have any ideas for you)

My issue is the built-in “Link Messages” that can be found from the Notes main application menu: Create - Mail - Special - Link Message. Some users, when sending like this, produce actual Notes URLs. Others (like me) still produce ‘broken’ DocLinks (broken because Outlook just displays the characteristics as text).

If it works from some users (same server, same client version, same PC type and OS from the same ‘PC rollout’), I want to know why it doesn’t work from others.

Subject: RE: sending Link Message to internet recipient

SOLUTION DISCOVERED: (to my initial question)

In the Location document, Mail tab, Format for messages addressed to internet addresses (bottom of the tab) needs to say MIME Format instead of Notes Rich Text Format.

Subject: RE: sending Link Message to internet recipient

When your code doesn’t work, does the user get ANY sort of notification? Any little pop up dialog box that says something they can’t decipher and therefore ignore?

Subject: sending Link Message to internet recipient

I know that I may get blasted for jumping in here with a commercial suggestion, but this can be a very slippery slope, and I wanted to give you a heads up if you are starting down it. Doug Finner, who jumps in later in this thread, is a current user of our software, so he may have a useful and more objective perspective as well.

With your version of Notes/Domino, doclinks will be converted to Notes URLs under certain conditions. These links will work in Outlook under certain conditions. Unfortunately, there are a number of problems with putting those conditions together.

The first, and most obvious, problem is that the hint server is not used. Thus, if you send a doclink from a database on Server A to a user who has no replica or only a replica on Server B, the doclink will point at Server B. Since it is a replica, you might think this is no big deal, but what if the two have not replicated yet? The person who receives the email will click on the link, which will try to resolve with Server B. Unfortunately, the error message that comes back is that the document has been deleted. That doesn’t let the user know that the server just hasn’t replicated yet, so they are left frustrated and calling the Help desk, which won’t have any very useful answer except “Wait, and keep trying!”

A second problem is that the Notes URL without the hint server shows up as notes:///repid/viewunid/noteunid, but in some versions of Outlook, the software will think the three slashes are a mistake and will “correct” them, thus giving you notes://repid/viewunid/noteunid and the repid is assumed to be the server, so the link fails.

A third problem is that in some versions of Notes (I don’t recall if 6.5.4 is one of them), if the view was a private view or secured view, the message will also be that the document was deleted.

A fourth problem is if the mail goes through a server which strips to plain text, or if the mail is read by a Blackberry user instead of an Outlook user, for example, the link will simply disappear, or be left as the word Link but no longer an actual link. This can also happen if the server is not the mail server, or if the link is sent through an application and points to a server other than the mail server, or in a few other esoteric situations.

For all of these reasons, as well as some additional functionality that allows more configurability, we offer a product called CoexLinks that is used by many, many companies who must coexist with Notes/Domino and other email systems, especially Outlook. As a bonus, our new version, which is about to go into beta, provides high fidelity MIME rendering, so that your messages in Outlook actually look like your messages in Notes, rather than having different tables widths, borders, fonts, etc. and looking clunky. See my recent blog post on Top 10 rendering goals to see examples of what I mean by this.

Again, sorry for the commercial interruption, but I hope it at least provides you with some areas to investigate.

Subject: CoexLink user perspective.

Sorry for the delay responding - been one of those weeks.

GO BUY COEX

DO NOT THINK

BUY

NOW…

We migrated from Notes mail to Exchange/Outlook and if I’d had to create and then manage the custom code to handle NDL (or notes urls or plain urls) via Notes, it would have turned into my life work.

Coex installs.

Coex works.

End of discussion.

Oh, and Ben is a really good guy to work with as well.

Doug

Disclaimer - I have no commercial or personal interest in Ben’s company. I am a happy user of the product.