sendmail_path in custom php.ini settings / php-mail doesn't work

Discussion in 'Installation/Configuration' started by Robert Schuster, Jan 26, 2018.

  1. Robert Schuster

    Robert Schuster New Member

    Environment: Debian 9.1 fresh installation, ispconfig 3.1.11 no MTA but msmtp installed !

    1. Adding a sendmail_path in custom php.ini settings has no effect at all.
      1. copying /usr/local/ispconfig/server/conf/php_fpm_pool.conf.master to
        /usr/local/ispconfig/server/conf-custom/php_fpm_pool.conf.master and removing the line
        php_admin_value[sendmail_path] = "/usr/sbin/sendmail -t -i -f webmaster_at_<tmpl_var name='domain'>" (removing not comenting it out #!!!) the sendmail_variable can be modified by custom php.ini settings.
    2. After finally sucessfull modified the sendmail_path to /usr/bin/msmtp (and checked by info.php) sending mail from a website still doesn't work
      1. msmtp ist succesfull installed and loggin into /var/log/mail.log
      2. From the command line
        echo -e "Subject: Test Mail\r\n\r\nDas ist eine Test-Mail" | msmtp --debug -t
        sends a mail out successfully to the configured (in /etc/msmtprc) remote mta.
      3. Calling mail-test.php
        ini_set( 'display_errors', 1 );
        error_reporting( E_ALL );
        $from = "";
        $to = "";
        $subject = ""Subject: Test Mail";
        $message = "This is a test to check the PHP Mail functionality";
        $headers = "From:" . $from;
        mail($to,$subject,$message, $headers);
        echo "Test email sent";
    nothing happens. The same with all webapplications which use the build in php mail function.

    Somebody may has any idea how to solve this?

Share This Page