IBM Support

Programmatically added names are truncated if more than 255 characters

Question/Answer


Question

When you use an agent to add names to a To, cc, or bcc field in an e-mail message through the use of a single string variable, the list of names is truncated if longer than 255 characters. This truncation occurs when using the Formula language or LotusScript language, as well as when using a Domino COM object by a language such as Microsoft Visual Basic. The issue can occur with any Names, Authors or Readers field, and is not limited to the address fields in the mail template.

Answer

This issue was reported to Quality Engineering as SPR# VADM66Y6YE and determined to be working as designed.

An example of code that would reproduce this issue is as follows:

Dim msg As String
msg = "abc@abc.com, abc@abc.com, abc@abc.com, abc@abc.com, abc@abc.com, abc@abc.com, " & _
"abc@abc.com, abc@abc.com , abc@abc.com, abc@abc.com, abc@abc.com, abc@abc.com, abc@abc.com," & _
"abc@abc.com, abc@abc.com, abc@abc.com, abc@abc.com, abc@abc.com, abc@abc.com,abc@abc.com,"
MailDoc.BlindCopyTo = msg

While it is possible to pass a String containing several addresses separated by commas, this practice is not recommend. The value is written to the field, but when the field is refreshed it will be truncated if the names and commas are more than 255 characters. To set values for these fields, you must use an array rather than a string value.

In the Formula language, each entry should be within quotes and separated by a colon.
For example: Field SendTo:="John Doe":"Jane Doe":"Jack Doe"

In LotusScript (and similar programming languages), each entry should be an array element.
For example:

    Dim longlist(25) As String
    longlist(0)="John Doe"
    longlist(1)="Jane Doe"
    longlist(2)="Jack Doe"
        ...
    Call doc.replaceitemvalue("SendTo", longlist)

Related information

Mailto Web Link with Large List of Names is Truncated

Document information

More support for: IBM Notes

Component: Mail

Software version: 6.0, 6.5, 7.0, 8.0, 8.5, 9.0

Operating system(s): Windows, iOS

Reference #: 1214278

Modified date: 05 September 2018