Comp 170

Mail Merge Programming Assignment

75 Points

Due: Tuesday, Nov 15

Goals:

  1. Practice reading and writing text files.
  2. Practice with string manipulation.
  3. Practice writing programs in the Linux environment.
  4. Practice using the “mail” program.

Description:

Write a C++ program that will remind software testers of their scheduled appointments.  The program should send an email to each person in the signup.txt file.  To do this a mail.txt file should be written that contains the formletter.txt with the markers replaced by the data from signup.txt.  Then use the following syntax to send the email to the tester.

 
system("mail -s \"Chess Testing Reminder\" EMAIL@harding.edu < mail.txt");

Files:

signup.txt       Provided to you           Watch for blank lines and time slots where know one has signed up.

Mon 12/6/2004 2:00 pm (seat 1),Kyle Arthur,EMAIL@harding.edu,555-1212

Mon 12/6/2004 2:00 pm (seat 6),Chris Curry,EMAIL@harding.edu,555-1212

 

Mon 12/6/2004 3:00 pm (seat 1),Josh Stauter,EMAIL@harding.edu,555-1212

Mon 12/6/2004 4:00 pm (seat 1),Jonathan Stinson,EMAIL@harding.edu,555-1212

Mon 12/6/2004 4:00 pm (seat 2)

 

Tues 12/7/2004 2:00 pm (seat 1),Stephen McCubbin,EMAIL@harding.edu,555-1212

Tues 12/7/2004 2:00 pm (seat 5),Willie Wellspring,EMAIL@harding.com,555-1212

 

Tues 12/7/2004 3:00 pm (seat 1),Dacia Roper,EMAIL@harding.edu,555-1212

Tues 12/7/2004 3:00 pm (seat 5),Will Ellis,EMAIL@harding.com,555-1212

 

formletter.txt             Provided to you

%NAME%,

 

This is a reminder that you are scheduled to test chess games in science room 203 at %TIME% on %DATE%.  If you have any questions or need to reschedule please contact me at 279-4826.

 

Thank you for your help,

 

Dana Steil

 

Replace %NAME%, %TIME% , and %DATE% with their respective values from signup.txt.

 

mail.txt           You generate these.  Email it the override it with the next tester.

Kyle Arthur,

 

This is a reminder that you are scheduled to test chess games in science room 203 at 2:00 pm on 12/6/2004.  If you have any questions or need to reschedule please contact me at 279-4826.

 

Thank you for your help,

 

Dana Steil