Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #12813 > unrolled thread
| Started by | GS <nomail@nospam.org.invalid> |
|---|---|
| First post | 2014-02-12 23:50 +0000 |
| Last post | 2014-02-13 11:25 +0000 |
| Articles | 11 — 7 participants |
Back to article view | Back to comp.lang.php
getting php mail error info GS <nomail@nospam.org.invalid> - 2014-02-12 23:50 +0000
Re: getting php mail error info Jerry Stuckle <jstucklex@attglobal.net> - 2014-02-12 22:30 -0500
Re: getting php mail error info Michael Vilain <vilain@NOspamcop.net> - 2014-02-12 23:16 -0800
Re: getting php mail error info Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-02-13 13:42 +0000
Re: getting php mail error info Allodoxaphobia <knock_yourself_out@example.net> - 2014-02-14 04:21 +0000
Re: getting php mail error info Jerry Stuckle <jstucklex@attglobal.net> - 2014-02-14 06:44 -0500
Re: getting php mail error info Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-02-14 15:00 +0000
Re: getting php mail error info "Peter H. Coffin" <hellsop@ninehells.com> - 2014-02-15 12:54 -0600
Re: getting php mail error info Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-02-16 01:06 +0000
Re: getting php mail error info Jerry Stuckle <jstucklex@attglobal.net> - 2014-02-15 20:24 -0500
Re: getting php mail error info Derek Turner <frderek@cesmail.net> - 2014-02-13 11:25 +0000
| From | GS <nomail@nospam.org.invalid> |
|---|---|
| Date | 2014-02-12 23:50 +0000 |
| Subject | getting php mail error info |
| Message-ID | <XnsA2D2F27E54CEFR2D2@127.0.0.1> |
I've got a php mail script which was working ok but the mail() call returned a bunch of errors today. The trouble is that it only returns true or false, I was wondering if there is any way to get more feedback from sendmail about what what went wrong, since I don't know whether I fed it bad data or whether sendmail playing up. I can't find any alternative mail calls I could use in the PHP manual. This is on a shared virtual hosting system so I don't have access to the linux or sendmail configuration and I can't find any log files in my userspace that pertain to the sendmail calls. The system is running PHP 5.3.27, I think the OS is Linux 2.6.32.
[toc] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2014-02-12 22:30 -0500 |
| Message-ID | <ldhe80$5ct$1@dont-email.me> |
| In reply to | #12813 |
On 2/12/2014 6:50 PM, GS wrote: > I've got a php mail script which was working ok but the mail() call > returned a bunch of errors today. The trouble is that it only returns true > or false, I was wondering if there is any way to get more feedback from > sendmail about what what went wrong, since I don't know whether I fed it > bad data or whether sendmail playing up. I can't find any alternative mail > calls I could use in the PHP manual. > > This is on a shared virtual hosting system so I don't have access to the > linux or sendmail configuration and I can't find any log files in my > userspace that pertain to the sendmail calls. The system is running PHP > 5.3.27, I think the OS is Linux 2.6.32. > GS, Unfortunately, all PHP gets back from sendmail is true or false - whether sendmail accepted the request or not. Any further information would have to come from the sendmail logs; I suggest you contact your hosting company to see what they changed, and perhaps a copy of their sendmail logs. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | Michael Vilain <vilain@NOspamcop.net> |
|---|---|
| Date | 2014-02-12 23:16 -0800 |
| Message-ID | <vilain-FCF04A.23165612022014@news.individual.net> |
| In reply to | #12813 |
In article <XnsA2D2F27E54CEFR2D2@127.0.0.1>, GS <nomail@nospam.org.invalid> wrote: > I've got a php mail script which was working ok but the mail() call > returned a bunch of errors today. The trouble is that it only returns true > or false, I was wondering if there is any way to get more feedback from > sendmail about what what went wrong, since I don't know whether I fed it > bad data or whether sendmail playing up. I can't find any alternative mail > calls I could use in the PHP manual. > > This is on a shared virtual hosting system so I don't have access to the > linux or sendmail configuration and I can't find any log files in my > userspace that pertain to the sendmail calls. The system is running PHP > 5.3.27, I think the OS is Linux 2.6.32. mail() is all you're gonna get in a shared hosting facility. If you want to extend php or using a cgi script to send the mail, that's up to your ISP if they'll allow it. But I would tend to doubt it. Your next option is a vps where you can setup your own dedicated server and run whatever you want on it. Usually more expensive but it's your call on if it's worth it. -- DeeDee, don't press that button! DeeDee! NO! Dee... [I filter all Goggle Groups posts, so any reply may be automatically ignored]
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2014-02-13 13:42 +0000 |
| Message-ID | <0.8076f4bbbe009409107c.20140213134214GMT.87iosjdt8p.fsf@bsb.me.uk> |
| In reply to | #12817 |
Michael Vilain <vilain@NOspamcop.net> writes: > In article <XnsA2D2F27E54CEFR2D2@127.0.0.1>, > GS <nomail@nospam.org.invalid> wrote: > >> I've got a php mail script which was working ok but the mail() call >> returned a bunch of errors today. The trouble is that it only returns true >> or false, I was wondering if there is any way to get more feedback from >> sendmail about what what went wrong, since I don't know whether I fed it >> bad data or whether sendmail playing up. I can't find any alternative mail >> calls I could use in the PHP manual. >> >> This is on a shared virtual hosting system so I don't have access to the >> linux or sendmail configuration and I can't find any log files in my >> userspace that pertain to the sendmail calls. The system is running PHP >> 5.3.27, I think the OS is Linux 2.6.32. > > mail() is all you're gonna get in a shared hosting facility. I've used one shared hosting provided that offered the PEAR Mail module which could be used to connect to whatever SMTP server you liked (one of which was their own). It was a while ago, but I think you get better error messages from it, though nothing is going to beat getting the server's logs for diagnosing the problem. <snip> -- Ben.
[toc] | [prev] | [next] | [standalone]
| From | Allodoxaphobia <knock_yourself_out@example.net> |
|---|---|
| Date | 2014-02-14 04:21 +0000 |
| Message-ID | <slrnlfr6dr.2njj.knock_yourself_out@vps.jonz.net> |
| In reply to | #12820 |
On Thu, 13 Feb 2014 13:42:14 +0000, Ben Bacarisse wrote: > Michael Vilain <vilain@NOspamcop.net> writes: >> GS <nomail@nospam.org.invalid> wrote: >> >>> I've got a php mail script which was working ok but the mail() call >>> returned a bunch of errors today. The trouble is that it only returns true >>> or false, I was wondering if there is any way to get more feedback from >>> sendmail about what what went wrong, since I don't know whether I fed it >>> bad data or whether sendmail playing up. I can't find any alternative mail >>> calls I could use in the PHP manual. >>> >>> This is on a shared virtual hosting system so I don't have access to the >>> linux or sendmail configuration and I can't find any log files in my >>> userspace that pertain to the sendmail calls. The system is running PHP >>> 5.3.27, I think the OS is Linux 2.6.32. >> >> mail() is all you're gonna get in a shared hosting facility. > > I've used one shared hosting provided that offered the PEAR Mail module > which could be used to connect to whatever SMTP server you liked (one of > which was their own). +1 Jonesy
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2014-02-14 06:44 -0500 |
| Message-ID | <ldkvj5$hs$1@dont-email.me> |
| In reply to | #12820 |
On 2/13/2014 8:42 AM, Ben Bacarisse wrote: > Michael Vilain <vilain@NOspamcop.net> writes: > >> In article <XnsA2D2F27E54CEFR2D2@127.0.0.1>, >> GS <nomail@nospam.org.invalid> wrote: >> >>> I've got a php mail script which was working ok but the mail() call >>> returned a bunch of errors today. The trouble is that it only returns true >>> or false, I was wondering if there is any way to get more feedback from >>> sendmail about what what went wrong, since I don't know whether I fed it >>> bad data or whether sendmail playing up. I can't find any alternative mail >>> calls I could use in the PHP manual. >>> >>> This is on a shared virtual hosting system so I don't have access to the >>> linux or sendmail configuration and I can't find any log files in my >>> userspace that pertain to the sendmail calls. The system is running PHP >>> 5.3.27, I think the OS is Linux 2.6.32. >> >> mail() is all you're gonna get in a shared hosting facility. > > I've used one shared hosting provided that offered the PEAR Mail module > which could be used to connect to whatever SMTP server you liked (one of > which was their own). It was a while ago, but I think you get better > error messages from it, though nothing is going to beat getting the > server's logs for diagnosing the problem. > > <snip> > How does that solve his problem? He doesn't want to connect to a different email server - he wants to get this one working. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2014-02-14 15:00 +0000 |
| Message-ID | <0.8da7462b1e3ff8032143.20140214150028GMT.87wqgxbuyb.fsf@bsb.me.uk> |
| In reply to | #12825 |
Jerry Stuckle <jstucklex@attglobal.net> writes: > On 2/13/2014 8:42 AM, Ben Bacarisse wrote: >> Michael Vilain <vilain@NOspamcop.net> writes: >> >>> In article <XnsA2D2F27E54CEFR2D2@127.0.0.1>, >>> GS <nomail@nospam.org.invalid> wrote: >>> >>>> I've got a php mail script which was working ok but the mail() call >>>> returned a bunch of errors today. The trouble is that it only returns true >>>> or false, I was wondering if there is any way to get more feedback from >>>> sendmail about what what went wrong, since I don't know whether I fed it >>>> bad data or whether sendmail playing up. I can't find any alternative mail >>>> calls I could use in the PHP manual. >>>> >>>> This is on a shared virtual hosting system so I don't have access to the >>>> linux or sendmail configuration and I can't find any log files in my >>>> userspace that pertain to the sendmail calls. The system is running PHP >>>> 5.3.27, I think the OS is Linux 2.6.32. >>> >>> mail() is all you're gonna get in a shared hosting facility. >> >> I've used one shared hosting provided that offered the PEAR Mail module >> which could be used to connect to whatever SMTP server you liked (one of >> which was their own). It was a while ago, but I think you get better >> error messages from it, though nothing is going to beat getting the >> server's logs for diagnosing the problem. >> >> <snip> > > How does that solve his problem? He doesn't want to connect to a > different email server - he wants to get this one working. Often, (usually? always?) the local sendmail is just a client that connects to the local MTA. If you use the Mail module to connect, you can, sometimes, get more error information than you do from mail(). Nothing that happens once the message is queued, of course, but if the mail logs are inaccessible, it might be better than the success/fail from PHP's mail() function. -- Ben.
[toc] | [prev] | [next] | [standalone]
| From | "Peter H. Coffin" <hellsop@ninehells.com> |
|---|---|
| Date | 2014-02-15 12:54 -0600 |
| Message-ID | <slrnlfvdvh.v5n.hellsop@nibelheim.ninehells.com> |
| In reply to | #12829 |
On Fri, 14 Feb 2014 15:00:28 +0000, Ben Bacarisse wrote: > Often, (usually? always?) the local sendmail is just a client that > connects to the local MTA. If you use the Mail module to connect, you > can, sometimes, get more error information than you do from mail(). > Nothing that happens once the message is queued, of course, but if the > mail logs are inaccessible, it might be better than the success/fail > from PHP's mail() function. OP said the mail() returned false. That's not usually a problem that's going to show up in mail logs, because it's not even gotten as far as something that logs anything. Why a mail submission would fail varies by host OS, too. Pretty much NOTHING short of a systemwide mail failure or a blatantly obvious problem with the submission (Nothing in the $to, for example) will get a mail() fail on a unix system. Windows will fail a mail() if the remote Mail Transport Agent doesn't answer or rejects the mail, which it *may* do for any reason, including "you've sent too much mail lately". In that case, yeah, it might be tricky, but there's still going to be no logs to look at. -- Cunningham's First Law: Any sufficiently complex deterministic system will exhibit non-deterministic behaviour.
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2014-02-16 01:06 +0000 |
| Message-ID | <0.76a49633968353903f5a.20140216010644GMT.874n3z987v.fsf@bsb.me.uk> |
| In reply to | #12834 |
"Peter H. Coffin" <hellsop@ninehells.com> writes: > On Fri, 14 Feb 2014 15:00:28 +0000, Ben Bacarisse wrote: >> Often, (usually? always?) the local sendmail is just a client that >> connects to the local MTA. If you use the Mail module to connect, you >> can, sometimes, get more error information than you do from mail(). >> Nothing that happens once the message is queued, of course, but if the >> mail logs are inaccessible, it might be better than the success/fail >> from PHP's mail() function. > > OP said the mail() returned false. That's not usually a problem that's > going to show up in mail logs, because it's not even gotten as far as > something that logs anything. That's a good point. The number of things that can go wrong and still be logged is very small. > Why a mail submission would fail varies by > host OS, too. Pretty much NOTHING short of a systemwide mail failure or > a blatantly obvious problem with the submission (Nothing in the $to, for > example) will get a mail() fail on a unix system. That does get logged by my MTA (masqmail) but I imagine that's just about the only error where mail() fails and something shows up. > Windows will fail a > mail() if the remote Mail Transport Agent doesn't answer or rejects the > mail, which it *may* do for any reason, including "you've sent too much > mail lately". In that case, yeah, it might be tricky, but there's still > going to be no logs to look at. -- Ben.
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2014-02-15 20:24 -0500 |
| Message-ID | <ldp405$hf4$1@dont-email.me> |
| In reply to | #12834 |
On 2/15/2014 1:54 PM, Peter H. Coffin wrote: > On Fri, 14 Feb 2014 15:00:28 +0000, Ben Bacarisse wrote: >> Often, (usually? always?) the local sendmail is just a client that >> connects to the local MTA. If you use the Mail module to connect, you >> can, sometimes, get more error information than you do from mail(). >> Nothing that happens once the message is queued, of course, but if the >> mail logs are inaccessible, it might be better than the success/fail >> from PHP's mail() function. > > OP said the mail() returned false. That's not usually a problem that's > going to show up in mail logs, because it's not even gotten as far as > something that logs anything. Why a mail submission would fail varies by > host OS, too. Pretty much NOTHING short of a systemwide mail failure or > a blatantly obvious problem with the submission (Nothing in the $to, for > example) will get a mail() fail on a unix system. Windows will fail a > mail() if the remote Mail Transport Agent doesn't answer or rejects the > mail, which it *may* do for any reason, including "you've sent too much > mail lately". In that case, yeah, it might be tricky, but there's still > going to be no logs to look at. > Peter, Actually, my MTA (Exim on Debian) does log why a submission was rejected. And while this is the default for the setup, the actions can be changed by the sysadmin. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | Derek Turner <frderek@cesmail.net> |
|---|---|
| Date | 2014-02-13 11:25 +0000 |
| Message-ID | <bm3ocnFdf29U1@mid.individual.net> |
| In reply to | #12813 |
On Wed, 12 Feb 2014 23:50:16 +0000, GS wrote: > I've got a php mail script which was working ok but the mail() call > returned a bunch of errors today. Don't know if this is any help but I use zendmail on shared hosting. I was given to understand, at the time I wrote the scripts, that it more secure. Be that as it may, I've never had any problems with it. I understand that it is possible to catch zendmail exceptions.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.php
csiph-web