PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
It is currently Tue Feb 19, 2019 2:53 am

All times are UTC - 5 hours

Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: php and postfix
PostPosted: Thu Oct 22, 2009 12:41 pm 
Forum Newbie

Joined: Thu Oct 22, 2009 12:39 pm
Posts: 1
Hello, I am using PHP and trying to send an email from within the PHP script using the mail() function. This is PHP 5.2.4 and Ubuntu Hardy Heron. I am just trying to send the email to myself to check whether this works. The PHP script does not generate any error and the return value for the mail() function is TRUE, but the email does not arrive.

I had sendmail installed originally but read that people have had better luck with postfix, so I installed that. Postfix seems to be working from what I can tell. I can do

telnet localhost 25
Connected to localhost.
Escape character is '^]'.
220 homemade ESMTP Postfix (Ubuntu)
ehlo localhost
250-SIZE 10240000
250 DSN

But the email is still not received from the PHP script. The problem may be in the php.ini file. These are the relevant settings:

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
;sendmail_from =

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

Thanks for any help you can give.

 Post subject: Re: php and postfix
PostPosted: Fri Oct 30, 2009 10:42 pm 
Forum Newbie

Joined: Fri Oct 30, 2009 8:58 pm
Posts: 3
I recently had to setup a ubuntu server with postfix and it took me 4ever :)
I was using 9.04 Jaunty Jack I think...

First you need to comment these two lines out like so (settings only for Windows):
;SMTP = localhost
;smtp_port = 25

Tons of good info HERE

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group