The Mail Transport

The Mail Transport sends messages by delegating to PHP's internal mail() function.

In my experience – and others' – the mail() function is not particularly predictable, or helpful.

Quite notably, the mail() function behaves entirely differently between Linux and Windows servers. On linux it uses sendmail, but on Windows it uses SMTP.

In order for the mail() function to even work at all php.ini needs to be configured correctly, specifying the location of sendmail or of an SMTP server.

The problem with mail() is that it "tries" to simplify things to the point that it actually makes things more complex due to poor interface design. The developers of Swift Mailer have gone to a lot of effort to make the Mail Transport work with a reasonable degree of consistency.

Serious drawbacks when using this Transport are:
  • Unpredictable message headers
  • Lack of feedback regarding delivery failures
  • Lack of support for several plugins that require real-time delivery feedback

It's a last resort, and we say that with a passion!

NOTE: Documentation for version 3 is in the wiki.