WordPress.org

Ready to get started?Download WordPress

Forums

Fast Secure Contact Form
email not sent for mini_sendmail (1 post)

  1. doniking
    Member
    Posted 1 year ago #

    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 -fSender@address.com To@address.com
    or
    sendmail -f Sender@address.com To@address.com

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

    what do you think?

    http://wordpress.org/extend/plugins/si-contact-form/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic