[Watford] PHP - mail() function

Neel Upadhyaya bahulneel at gmail.com
Sun Dec 2 23:22:55 GMT 2007


php mail actually opens a pipe to sendmail so having sendmail or a sendmail
replacement in your path is important.  Also having access to
/var/log/maillog is often the most valuable resource when debugging outgoing
mail.

First check your path to see if the sendmail command is available to php
(it's worth checking of the base dir is set in the php ini too) then once
you're sure sendmail is there check your maillog.  if you still have issues
post an excerpt from the maillog and i should be able to tell you the
problem.

PS.  off topic, i will be attending next week, however, I was wondering if
someone could give me a lift from near the library, or anywhere else near
the town center, as I don't drive.

--N

On 02/12/2007, Alain Williams <addw at phcomp.co.uk> wrote:
>
> On Sun, Dec 02, 2007 at 09:29:15PM -0000, walt wrote:
> > Hi,
> >
> > I cannot get this work.  I followed the instructions, replaced postfix
> with
> > sendmail, set it up and tested it with telnet localhost smtp as well as
> with
> > evolution and mails are sent and received.
> >
> > But the PHP mail() function wont work. Dont know where the mail goes
> either.
> > Is there a log somewhere that tells me whether the mail() function has
> > attempted to connect to sendmail smtp?
> >
> > I have checked the web and this is not unusual, by all accounts.  None
> of
> > the fixes I have seen there work though. If there is way round this I'd
> like
> > to know.
>
> How are you running php mail(), via a web form or interactively ?
> If on a web form check the log files. Is error_reporting in your php.ini
> set to maximum ?
>
> mail() passes mail to the MTA, is there something in the mail queue ?
> What do the MTA logs say ?
>
> --
> 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>
>
> _______________________________________________
> Watford mailing list
> Watford at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/watford
>



-- 
MCSE is to computers as McDonalds Certified Chef is to fine cuisine.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.lug.org.uk/pipermail/watford/attachments/20071202/3c1aa553/attachment.html


More information about the Watford mailing list