To compose the email messages, you need to know a little bit about email and SMTP. An email message is composed of a number of headers and a body. However, you can get by with the minimum of headers, since the only headers required to make a sensible email messages are From (who is the message from?), To (who is the message to?) and Subject (the subject line of the message). Compose the email message in a string. Since emails are multi-line messages, it's recommended you use a heredoc or the DATA stream, both of which are demonstrated in the example programs.