Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to input a snippet of code that includes each recipient's respective email address in the body of an email. Let's say I use Active Directory to send a company-wide email in Outlook (my company uses Exchange):

To: Company-All

Recipient gets email with content in body that contains:

Recipient gets email with content in body that contains:

etc. for all other people in the organization.

share|improve this question
up vote 1 down vote accepted

Outlook has in-built Mail Merge functionality for personalizing bulk/mass emails.

See Outlook Blog Mail merge Tutorial. There are several other version-specific tutorials out there as well.

If you want to just insert some code like, for example, [Name] in the body as you type, and then have it replace it with the name of each person in the group when you click "Send", then you may not be able to pull it off.

The reason being is that when you send an email to a group of people, you only send ONE message to the email server, and then it sends copies to each recipient. Therefore, you can't modify the email body for each recipient.

Options to investigate (unless others have more concrete ideas/solutions):

  • A "plug-in" for Exchange that does this for you (before it sends out to the recipients).
  • A custom email server to act as a proxy. One that makes the changes, creates new mails, and then passes them to Exchange.
  • A VBA macro attached to Outlook's Application.ItemSend. It would have to abort the current email, parse the recipient list, find/replace on the body, create a new email for each recipient and then send them all.

If you want to replace things with other information from outside the current message (contact fields like Phone Number for example), then your VBA will get more complicated. :)

share|improve this answer

As techie007 has noted Exchange is not the tool to do this. Once you deliver the message to Exchange it will send the same copy to everyone it is addressed to. You need an MUA (Mail User Agent) which will generate a separate customized e-mail for each recipient.

Many tools have mail merge capabilities. This is the kind of software which is required. Unfortunately, this will result in Exchange having to store one copy of the email for each recipient. This will be more resource intensive than sending a single email to everyone.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .