Hi,
>
>I don't know the best way to explain my problem, but here it goes. :)
>
>Dev machine is a  RedHat 6.2 install. Apache 1.3.12 with PHP 4.0.1pl2 and stock
>sendmail.
>
>Server is Redhat 6.2 apache 1.3.12 PHP 4.0.1pl2 with  qmail (and vpopmail)
>
>I got a php script that I developed on  the dev machine.. every thing works. 
>it calls mail() proper headers and whatnot.. sendmail connects to my server
>sends the mail and works. Things here O.K.
>
>
>Move the web code to the server.  Try the php script. nothing... no erros no
>nothing.   I do a 'tail -f' on the qmail log files. nothing shows up... 

 It seems that mail() function from php 4.0.1pl2 expects to find
_real_ sendmail. At least, it use the following code:

        sendmail = popen(sendmail_path, "w");

        if (sendmail) {
                fprintf(sendmail, "To: %s\n", to);
                fprintf(sendmail, "Subject: %s\n", subject);
                if (headers != NULL) {
                        fprintf(sendmail, "%s\n", headers);
                }
                fprintf(sendmail, "\n%s\n", message);
                ret = pclose(sendmail);
                if (ret == -1) {
                        return 0;
                } else {
                        return 1;
                }
        }

 As quick hack,  could you try to insert use the following:
 move /var/qmail/bin/sendmail -> /var/qmail/bin/sendmail-bin
 
 and create fake script
 /var/qmail/bin/sendmail:
 
 #!/bin/bash
 /var/qmail/bin/sendmail-bin -t $*


 -t  flags means using qmail-inject with flag -H instead of -a (i.e.
using header receipients)
 
 WBR, Vladimir Goncharov

 

Reply via email to