Updated: 26 April 2026
What happens when you call mail():
- PHP looks at the
sendmail_pathdirective inphp.inie.g./usr/sbin/sendmail. - Sendmail may be wrapped by the Postfix mail transfer agent.
- The MTA looks at headers, performs a MX record lookup and attempts to send mail via port 25, using the SMTP protocol.