Sendmail is an open source program used on most unix computers. With sendmail, perl has the ability to send information out.
Sendmail will send the email, with its headers and content, to the mail server and then to the recipient(s).
There are many standard headers but the ones you will most commonly encounter are:
A comma separated list of recipient addresses.
The email address of the sender.
The email address to which replies should be sent.
The subject of the message.