Create a new file, we'll call it email.txt, with vi or whatever text editor you use. Then add parameters for the SMTP headers that you want to include in the message, such as "From:", "To:", and "Subject:". You also MUST remember to leave an extra, empty line at the end of the document because that signals the end of your email message. An example of the text for a basic message would be:
Subject:Hello, thanks for reading
Hi, I appreciate you reading this blog post.
You can specify other header parameters in the file as well, such as date, cc, etc by simply adding an entry for them. If you want to find out more, check the SMTP Wiki, or perform your own Google search to find resources.
After you've saved that text into your email.txt file, now you're ready to use sendmail to send this message. You can use the -t switch to import your file.