Carnegie Mellon University Website Home Page
 

Mail Merge Feature

The massmail program allows you to send more personalized e-mail messages using the mail merge feature. For example, if you need to send a group of people the date that each person will be moving into a new office along with their new office number, you can use the mail merge feature as shown:

  1. Create the data file. The text file that contains the userids will also contain a tab delimited list of the information for each individual user. The first column in your userid text file must be the list of userids or e-mail addresses and will be who massmail sends out e-mail to. Subsequent columns will be the data for your file.

    ju33 Joe User December 3rd, 2000 Cyert 363
    yk22 Yerin Kay December 4th, 2000 Cyert 362
    dw3x Doug Wonder December 5th, 2000 Cyert 352
    bc2t Brian Cable December 5th, 2000 Cyert 322
  2. Create the message file. The message file in a mail merge will reference items in your userid file by column number. The first column is represented by %0%, the second column %1%, etc.

    For example, using the above data, you can compose a message similar to the following:

    Hello %1%,
    You will be moving on %2% to %3%. If you have any questions,
    reply back to this mail message.

    The message that the user receives will appear as such:

    Hello Joe User,
    You will be moving on December 3rd, 2000 to Cyert 363. If you have
    any questions, reply back to this mail message.

  3. To send the message, type

    % massmail --merge datafile.txt "This will be your subject" messagefile.txt

    Note: Without the --merge, your e-mail will not be processed as a mail merge.

Last Updated: 10/10/07