1

Is there any way to execute PHP mail() function with some arguments so sendmail will load different configuration? Something similar like Python can do with a code below

ssmtp = "/usr/sbin/ssmtp" args = [ssmtp, '-v', '-v', '-v', '-C', '/etc/ssmtp/ssmtp-locrelay.conf', to_address]

JackTheKnife
  • 3,795
  • 8
  • 57
  • 117

1 Answers1

1

The binary can be changed with the sendmail_path directive and command-line arguments go as $additional_parameters:

bool mail ( string $to , string $subject , string $message [, string $additional_headers [, string $additional_parameters ]] )

Álvaro González
  • 142,137
  • 41
  • 261
  • 360