NYCPHP Meetup

NYPHP.org

[nycphp-talk] mail function in Linux-Apache

Carlos G. Chiossone carlos at sprout.net
Tue Sep 16 15:03:40 EDT 2003


Ok problem solved thanks to Nestor. Now is this a BUG?

This is part of my ini in the Linux box

[mail function]
; For Win32 only.
SMTP = email.sprout.net

; For Win32 only.
;sendmail_from = me at localhost.com

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
; sendmail_path = '/usr/sbin/sendmail -t -i'

And now it works fine. It is being directed to an Exchange server. Is this why SMTP works? Why does it say for Win32 only?

If I uncomment "sendmail_path" the emails are not sent!!! So in theory is RELAYING to my mail server directly? Not at all, if I turn of the service for "sendmail" it also does not send the emails, but they do stay in que and when restarted they go out.

I could not find any notes on this issue, and I am sure I am not the only one running PHP 4.3.2 sending mail through a Linux box.

Thanks to all for the help, and hope this notes will help someone in the future. But actually hope they don't go through this.

Carlos



-----Original Message-----
From: Nestor Florez [mailto:nestorflorez at earthlink.net]
Sent: Tuesday, September 16, 2003 12:52 PM
To: NYPHP Talk
Subject: Re: [nycphp-talk] mail function in Linux-Apache

If you can send maill from the command line then you probably need to set up your php.ini
You can set it up to sendmail or SMTP as long as you know the name of you mail server or SMTP server

I ran into the problem in a Mac OS X and send mail would not work althought,
I could send mail from the command line so I changed it to SMTP and it work.

Nestor :-)

-----Original Message-----
From: Hans Zaunere <hans at nyphp.org>
Sent: Sep 16, 2003 9:00 AM
To: NYPHP Talk <talk at lists.nyphp.org>
Subject: Re: [nycphp-talk] mail function in Linux-Apache



Carlos G. Chiossone wrote:

> Hi guys, thanks in advance for helping.
>
> I am having strange issues with a Linux server running Apache. I can send emails from the command line using the mail command but when I try sending it from PHP it goes nowhere. I also don't get any errors neither on the Apache log file nor on the screen. My php.ini is set to give all errors and warnings and the mail is pointing to the correct directory where sendmail is, actually using the default path set by PHP.

A couple things to try:

--- tail -f /var/log/maillog and see if there are any errors indicated while trying to send from Apache, versus the mail command line tool

--- can Apache (assuming you're running PHP as mod_php) execute the required sendmail, etc binaries?  Does it have the permissions?  su to the user Apache is running as and try the mail command again

--- in the php.ini are the settings correct?  I think the default is /usr/sbin/sendmail, which much exist and be executeable/readable by apache

HTH,

h


_______________________________________________
talk mailing list
talk at lists.nyphp.org
http://lists.nyphp.org/mailman/listinfo/talk



_______________________________________________
talk mailing list
talk at lists.nyphp.org
http://lists.nyphp.org/mailman/listinfo/talk



More information about the talk mailing list