Mail supports different types of backends to send email. So two steps are necessary to send an email.
Mail supports three types of backends:
Sends a mail using PHPs build-in mail()-function.
Sends a mail using a sendmail program.
Sends a mail directly connecting to a smtp server.