php mail

Updated: 26 April 2026

What happens when you call mail():

  1. PHP looks at the sendmail_path directive in php.ini e.g. /usr/sbin/sendmail.
  2. Sendmail may be wrapped by the Postfix mail transfer agent.
  3. The MTA looks at headers, performs a MX record lookup and attempts to send mail via port 25, using the SMTP protocol.

Leave a comment