Re: Getting mail to work, help please

From: Date: Mon, 10 May 2004 07:11:55 +0000
Subject: Re: Getting mail to work, help please
References: 1  Groups: php.install 
Request: Send a blank email to php-install+get-13440@lists.php.net to get a copy of this message
Chris Holloway wrote:
Hi; I am new to PHP and have recently installed the latest version of PHP on my linux box. I am trying to make the mail function work with my MTA Qmail. I have been testing by I wrote a simple testingemail.php script like this <?php ini_set ('display_errors', 1); mail( 'chris@hollowayfam.net','Testing','Testing <mailto:%27chris@hollowayfam.net%27,%27Testing%27,%27Testing> - Congragulations!','From:php@hollowayfam.net'); ?> This returns no errors but I never get the message. I dont think qmail does either. I'm looking for what I would do to at least get an error message so I can tell what the problem is. The other configuration changes I have made are: /usr/local/lib/php/Mail/sendmail.php I have changed the $sendmail_path to = '/var/qmail/bin/sendmail'; I have also tried that the default way. I also changed the default configurations to no avail in /usr/local/lib/php/Mail/smtp.php $var_auth = true; $ var_username='php@hollowayfam.net' <mailto:$var_username=%27php@hollowayfam.net%27> ; $var_password='imnottellng'; That is basically what I've done. Is there something obvious I am missing, or is there a way I can make a better test script to get me an error and at lesst indicate the problem? I hate to ask here but I have scoured the net and am about out of ideas. Chris,
The usual two questions I suggest are : 1. Is a normal user able to send email from the command line outside of php? 2. There should be some record in /var/log/maillog (or whatever file your MTA logs to). I'm not familiar with qmail, nor do I see why you are editing files in /usr/local/lib/php/Mail as configuration should be limited to php.ini, so it might simply be that I'm not familiar enough with your particular setup. HTH Chris

« previous php.install (#13440) next »