Set each item to a script variable, $Subject, $CC, $Timestamp etc., then go to the related History table layout, create a new record and set the variables data into the respective field. Those are the basic steps, you'll have the usual housekeeping and clean up.
Thanks Bumper for your answer, however, I need more information that this to carry out a test. I haven't used script variables so I am not sure where to begin.
Are there any examples of creating a history log for multiple users who send email using the send mail script?
First create a log table that has all the fields for the data you want to keep, relate it to the table you will be sending the email from.
Then write the email send script as you normally would. Note the basic steps of sending an email and printing are pretty much the same.
Create script steps for each of the pieces of data you want to log, Click on Set Variable, give your variable a name (you get to pick the name) say: $__ContactName, then set that variable to the data that you want to keep, in this case it will be the data you previously put in the To: field. Do this for each of the pieces of data.
Then go to a related layout of the log table, create a new record and do a Set Field for each of the variables to their respective fields in the log table.
If you are sending one email at a time then finish the script and back to where ever you would normally send the user. If there are multiple emails to be sent then put the above into your loop and you'll go back to the original printing layout and restart the loop.
A one dollar sign variable, called a local variable, is only good for the run of the script, a two dollar sign variable, called a global variable, stays in memory beyond the run of the session or until you set it to null or empty. Variables are a developers best friend. You'll probably find lots of uses for them.
HTH, if you need any thing else ask away.
Perfect timing - Thanks very much, I am working on this now.