IBM Support

Error: 'Unable to send mail...' when using LotusScript Send method

Technote (FAQ)


Question

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?


Cause

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.


Answer

This issue was reported to Quality Engineering as SPR# EMMS2YMU3J and was found to be a software limitation.


Workarounds:
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.

    Workaround 1:
    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.

    Workaround 2:
    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)
      ...
      ...
      ...
      Exit sub

      AmbiguousError:
      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)
      Call docMail.Send(True)
      Resume next
      End sub
    Supporting information:
    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)"

Related information

Is there a way to disable the Notes 8 Recent Contacts f


    Cross reference information
    Segment Product Component Platform Version Edition
    Messaging Applications IBM Notes Mail Linux, Mac OS X, Windows 8.5, 8.0, 7.0, 6.5

    Historical Number

    137148

Document information

More support for: IBM Domino Designer
LotusScript

Software version: 6.5, 7.0, 8.0, 8.5

Operating system(s): Windows

Reference #: 1153854

Modified date: 14 February 2008


Translate this page: