Error: 'Unable to send mail...' when using LotusScript Send method
You attempt to send a document from Lotus Notes® or Lotus Domino® using the LotusScript NotesDocument Send method. The following error is returned:
"Unable to send mail, multiple matches found in Name & Address book."
Why does this happen?
The NotesDocument Send method will not send a document when the recipient's name is ambiguous. For example, if the SendTo field contains the name, "Jim Smith," and Jim Smith is listed in both the Domino Directory and your Personal Address Book, no e-mail is generated by the Send method. This issue can also occur when cascaded Name Domino Directories are being used.
In Notes release 8.0, and later, the issue can occur if the name appears in your Recent Contacts within your Personal Address Book and the Domino Directory.
NOTE: In Notes/Domino releases prior to 4.1, no error message was returned. The error message was added to provide a means to trap the ambiguous condition.
This issue was reported to Quality Engineering as SPR# EMMS2YMU3J and was found to be a software limitation.
When a SendTo entry specifies a domain name, no initial validation of the entry is performed but the router still evaluates the SendTo field as usual.
Append the domain name to the end of the SendTo value, as in:
Call doc.send(True, "Jane Doe/US/Widgets@Widgets")
Additionally, if you want to have a duplicate entry in your Personal Address Book, copy the entry from the Domino Directory (People view --> highlight the person --> choose Edit --> Copy) and paste it into your Personal Address Book (People view --> choose Edit --> Paste). This will eliminate the error.
This is sample code to add the domain name automatically if an "ambiguous name" error occurs.
NOTE: The code below is a sample script, provided to illustrate one way to approach this issue and is used at your own risk. In order for this example to perform as intended, the script must be laid out exactly as indicated below. Product Support cannot customize this script for specific environments or applications.
Before the Send button, add the following:
On Error 4294 goto AmbiguousError doc.send(True)
Set namesdb= session.getdatabase(db.server, "names.nsf")
Set Persondoc= namesdb.getview("($Users)").getdocumentbykey(docmail.SendTo(0))
docMail.SendTo = Persondoc.fullname(0) & "@" & Persondoc.MailDomain(0)
For additional information relating to the Recent Contacts view in Notes 8 releases, refer to the following documents:
-- Document #1267115, "Is there a way to disable the Notes 8 Recent Contacts feature?"
-- Document #1395526, "Understanding Notes 8.x Recent Contacts (Q&A, Related Content, and Enhancement Requests)"
|Messaging Applications||IBM Notes||Linux, Mac OS X, Windows||8.5, 8.0, 7.0, 6.5|
Translate this page: