mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Dave Festing <dave_festing@hotmail.com>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] PTXdist PHP5 CLI mail()
Date: Fri, 14 Jun 2013 11:15:53 +0000 (UTC)	[thread overview]
Message-ID: <loom.20130614T130435-529@post.gmane.org> (raw)
In-Reply-To: <OFFF71E9E0.233EDB72-ONC1257B8A.003B3D17-C1257B8A.003C37C4@hytera.de>

 <Dennis.Herbrich@...> writes:

> 
> dave_festing@... wrote:
> 
> >  Have been struggling with trying to get PHP's mail() to work [...]
> > Appreciate any suggestions as to the apparently fundamental mistake
> > I am making.
> 
> The fundamental mistake is not checking the debug log output to find the
> real reason *why* the call to mail() fails. Crank up the log level for 
> PHP,
> and see what it tells you. You might be having no sendmail binary in the
> expected path, or some other file system permission problem that prevents
> mail() to do it's job.
> 
> What you may not know is that PHP's mail() function usually uses an
> external binary ("/usr/bin/sendmail") to drop the mail into the locally
> running, completely independent MTA. This obviously allows for many things
> to go wrong on the way. Check the PHP debug log, then the MTA's logs if
> delivery somehow fails.
> 
> No MTA running locally? Try using PHP's SMTP features directly with a 
> remote
> MTA instead, or install a simple forwarding MTA, depending on your
> requirements.
> 
> In either case, this is much more of a PHP/MTA configuration issue,
> and likely nothing ptxdist-specific.
> 
> Best regards,
>   Dennis
> 
> 
Dennis,

I should have stated that I am running msmtp as the local MTA.  I keep an
eye on the log files.  The main issue with mail() is that it doesn't return
useful error messages.  With the CLI version I get a mail.log message that
confirms that mail() has been sent, whilst with the web-based version there
is no such indication plus no PHP_errors either.

PHPmailer as least returns some information.

As long as there is nothing wrong with using PHP with CLI enabled in PTXdist
2012.12.0 for my web-page requirement I will look elsewhere.  I will read up
on your suggestions.

Thank you,
Dave 




-- 
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2013-06-14 11:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.9.1371204002.4501.ptxdist@pengutronix.de>
2013-06-14 10:57 ` Dennis.Herbrich
2013-06-14 11:15   ` Dave Festing [this message]
2013-06-14  9:20 Dave Festing
2013-06-20 10:04 ` Dave Festing

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20130614T130435-529@post.gmane.org \
    --to=dave_festing@hotmail.com \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox