|
|
|
|
|
|
| Author |
Message |
Charles Cazabon *nix forums Guru
Joined: 08 Jan 2005
Posts: 805
|
Posted: Wed Jul 05, 2006 2:09 pm Post subject:
Re: PHP Mail() Issue?
|
|
|
alex@schnarff.com <alex@schnarff.com> wrote:
| Quote: |
I have Qmail installed and functional, and Perl has zero issues writing
to /usr/bin/sendmail (which is just a symlink to
/var/qmail/bin/sendmail) with a call such as 'open(MAIL,
"|/usr/bin/sendmail -t -i");',
|
Okay.
| Quote: | including from scripts run by Apache. When I run phpinfo(), sendmail_path
is set to /var/qmail/bin/sendmail (though sendmail_from is blank). If I call
mail() from PHP, it returns success, and I see a message in my Qmail logs
that looks like it's almost sent the mail, but not quite:
@4000000044abc1e732265f0c info msg 20981: bytes 264 from
alex@schnarff.com> qp 27970 uid 67
@4000000044abc1e732ac966c end msg 20981
|
Actually, it did successfully process the message. The above logs indicate
the message had 0 recipients and therefore there was nothing more for qmail to
do.
How are you specifying the recipients of your message? The code and message
template you showed didn't show any.
Charles
--
--------------------------------------------------------------------------
Charles Cazabon <qmail@discworld.dyndns.org>
Read http://pyropus.ca/personal/writings/12-steps-to-qmail-list-bliss.html
My services include qmail consulting. See http://pyropus.ca/ for details.
-------------------------------------------------------------------------- |
|
| Back to top |
|
 |
schnarff *nix forums beginner
Joined: 21 Feb 2005
Posts: 3
|
Posted: Wed Jul 05, 2006 1:46 pm Post subject:
PHP Mail() Issue?
|
|
|
Hello All,
I apologize if this question has been asked before, but I've had zero
luck finding an answer, either in the archives or by regular ol'
Googling.
I have Qmail installed and functional, and Perl has zero issues writing
to /usr/bin/sendmail (which is just a symlink to
/var/qmail/bin/sendmail) with a call such as 'open(MAIL,
"|/usr/bin/sendmail -t -i");', including from scripts run by Apache.
When I run phpinfo(), sendmail_path is set to /var/qmail/bin/sendmail
(though sendmail_from is blank). If I call mail() from PHP, it returns
success, and I see a message in my Qmail logs that looks like it's
almost sent the mail, but not quite:
@4000000044abc1e732265f0c info msg 20981: bytes 264 from
<alex@schnarff.com> qp 27970 uid 67
@4000000044abc1e732ac966c end msg 20981
It's as if the message makes it to Qmail, but isn't being properly
processed. Seeing as how I've even set the From: address on the return
envelope, I don't understand what I'm doing wrong here; theoretically,
this should work.
Here's the PHP that sends the mail:
$subj = "Test PHP Mail";
$body = "This is an e-mail from PHP.";
$add_headers = "From: alex@schnarff.com\r\n";
$add_params = "-falex@schnarff.com";
if (mail($_POST['email-addr'], $subj, $body,
$add_headers, $add_params)) {
...
(Note that $_POST['email-addr'] is a known-valid email address -- I'm
just sending to myself at alex@schnarff.com).
Any thoughts?
Thanks,
Alex Kirk |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Sat Nov 22, 2008 3:55 am | All times are GMT
|
|
MySpace Images | Mortgages | Record Internet Radio with Tags | Cadillac | MPAA
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|