• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 528
  • Last Modified:

Mass mail out addressed to recipient names

Is it possible to write one e-mail to numerous people from your address book (or group of people) were the text is configured to the person reading it?

So if I've a group of people Tom, Dick, Harry and write "Dear name" the word name will be replaced by the persons name when they read the mail?  

These people are not necessarily Lotus Notes users so I'm not sure if having some computed text in the mail body which pulled in the common name would work?
1 Solution
this may not be possible.

Instead what u should do is,

I assume this is not in a mail database.
Write a script which will get values based on the group name.
group=listof names
For x=0 to group.values
msg1="Dear "+group.values(x)

call maildoc.send

Something like the above.
In  a Body field, u can't have Computed text. basically it is a Field.
You need to develop an application to do this.  But luckily, there are free apps or examples (depends on how you look at this) available.  
Look in the sandbox :


Computed text WOULD work for Lotus Notes internal users.  Computed text does not work when sent out via SMTP (Internet users).  Instead, you need FIELDS, which means designing a custom form and having the form sent with the document, so that:

1) Notes users will read the message using your custom form
2) The SMTP converter will pay attention to the same custom layout including your "personalization" fields, and attempt to convert it to HTML

An alternative: You can develop a custom message body layout, and use code to create STANDARD messages that contain the text "pasted" from the custom form.  Teh custom form is only used to prepare th tet, which then gets copied into regular messages, but with the custom text intact.

Next issue is how to design the custom form so that it contains "Dear John," -- the first name.  This will probably involve a further customization of your address book. Alternatively, yo can move the contacts into a folder, and set some external code to use that folder for the distribution list.

One thing you will NOT be able to do (or at least without making it harder on yourself) is to put the names into a group, and just use th egroup.  That's because the group is just a bunch of text consisting of the mail addresses and/or contact names.  To pul the first name, something would have to read the group members, put the address in the To field, then try to figure out what contact the name is based on, so it can pull the first name from the contact.  Much better off just using a folder of fcontacts and treating that folder as a distribution list.
RichardStarkeyAuthor Commented:

hmmm.. slightly more complicated then I thought it would be.  I was hoping there would be a standard function in the Lotus Notes mail file which would allow this.  My company has a pretty strong reluctance to modify or change the design of the mailfile template or the address book template so I would be pushed to get any thing of that ilk pushed accepted.

I've actually got it working in several applications already using script similair to Madheeswar's.  I can select the list of receipients, create the mail message and the 'Send' action of the form creates individual mails for each recipients.  I use predefined codes in the mail message (eg; *FN* for first name, *SN* for surname) which my action looks for and then replaces with the personalised information from the receipient's personell document
OK, but those aren't incorpporated into the mail template... and in fact, they needn't be.  The custom form can exist outside of mail, yet use mail faclities.

Similarly, for the address list, as long as it is coming out of a personal address book, doesn't necessarily require design changes. As long as there is some way for the code that sends the messages to understand which contacts to use, you are OK.  How can you do that?
1) As I suggested, you can put the list in a folder, and have the script run through that folder
2) Another way mightbe to export the wanted contacts to a text file, spreadsheet or other file (R6 makes this very easy to do), and have the script read that exported source.

But either way, I believe you will need a custom form. The only way I can see doing this without a custom form is to use "tags" as you describe, and search/replace. Problem there is I doubt it will work if you do more than a few dozen names in any list.  Notes is likely to crash if as single script forces Notes to open a form on screenmany times, do search/replace/send/close each time, not give Notes a chance to "breathe."

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now