Does php mail call use php.ini sendmail.ini

When using the mail() function in PHP, it uses the sendmail binary specified in the sendmail_path directive in the php.ini file. This is true even if you have a sendmail.ini file.

Here's what happens:

  1. PHP looks for the sendmail_path directive in the php.ini file.
  2. If sendmail_path is set, PHP uses the specified sendmail binary to send the email.
  3. If sendmail_path is not set, PHP falls back to using the default sendmail binary, which is usually /usr/sbin/sendmail on Unix-like systems.

The sendmail.ini file is used by the sendmail binary to configure its behavior. It's not directly related to the mail() function in PHP.

However, if you're using the sendmail binary as the sendmail_path in your php.ini file, then the settings in sendmail.ini will be used to configure the sendmail binary.

To summarize:

I hope that helps clarify things!