[Watford] PHP - mail() function

Alain Williams addw at phcomp.co.uk
Mon Dec 3 11:30:29 GMT 2007


On Mon, Dec 03, 2007 at 09:40:14AM -0000, walt wrote:
> Thanks Alain,
> 
> I was looking for the logs but Linux is like a rabbit warren, I can never
> find anything or I have to read reams of stuff to track it down. Which is
> why I asked the question,  are there any logs somewhere.

Depends on which distro you are using (do tell us) as to exactly they are,
but start by looking under /var/log.

> I am using a web form to access sendmail via mail().
> 
> On the other hand I have found a command that allows testing of sendmail:
>  /usr/sbin/sendmail -bv -v -oL10 recipient at domain.net
> I ran it and it tells me that sendmail is functional that the address is
> deliverable using my ISPs relay host.
> 
> If I then tried the next test:
> 	/usr/sbin/sendmail -v  walt at helvatron.co.uk
> 	This is a test
> 	.
> I get:
> walt at helvatron.co.uk... Connecting to [127.0.0.1] via relay...

You don't want to do that ...

> And after all that I managed to track down the log under /var/log/mail which
> contains no entries about mail() attempting to connect.
> 
> I have no idea yet where to look for the queue (MTA) file/folder/logs.  



> There are 2 php.ini, /etc/php5/apache2  &  /etc/php5/cli.  I am assuming its
> the one in apache2 I need to change and I have set 'error_reporting=E_ALL' .

Set:
	display_errors = on
	log_errors = On
	error_reporting=E_ALL | E_STRICT

What is the value of error_log ?

Run a php script with: <?php phpinfo(); ?>
That will tell you which php.ini you are using.
Looks as if you are using debian (or ubuntu) ??

-- 
Alain Williams
Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256  http://www.phcomp.co.uk/
Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php
Chairman of UKUUG: http://www.ukuug.org/
#include <std_disclaimer.h>



More information about the Watford mailing list