• I installed apache and php in apache mod_chroot and to simplify the sendmail setup, i used mini_sendmail and everything works using php mail().
    However, I use your plugin si-contact-form, and found it not working when I had “Custom E-mail From (optional):” enabled.

    The apache error is:
    usage: /usr/sbin/sendmail [-f<name>] [-t] [-s<server>] [-p<port>] [-T<timeout>] [-v] [address …]

    it didn’t work with wp_mail nor php mail().

    I solved it myself by modifying your code by removing the space behind the ‘-f’ that is passed to mail() function:

    so, this line (and there is another similar lines):
    @mail($mail_to,$subj,$msg,$header_php, ‘-f ‘.$this->si_contact_mail_sender);

    becomes:
    @mail($mail_to,$subj,$msg,$header_php, ‘-f’.$this->si_contact_mail_sender);

    because the sendmail can work either with
    sendmail [email protected] [email protected]
    or
    sendmail -f [email protected] [email protected]

    but mini_sendmail only works without the trailing space, so i chose to remove the trailing space behind -f.

    what do you think?

    https://www.ads-software.com/extend/plugins/si-contact-form/

  • The topic ‘email not sent for mini_sendmail’ is closed to new replies.