FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Log error when mail() returns FALSE
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
Log error when mail() returns FALSE [message #29906] Mon, 23 January 2006 15:42 Go to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
Please consider logging an error when the forum is unable to send mail. Currently, mail() failures are ignored.
Re: Log error when mail() returns FALSE [message #29919 is a reply to message #29906] Tue, 24 January 2006 13:34 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
Return status of the mail() function in unreliable in many situation, testing the return status will lead to many false positives.

FUDforum Core Developer
Re: Log error when mail() returns FALSE [message #29930 is a reply to message #29919] Tue, 24 January 2006 14:28 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
Yes, one may get false positives, however you will never get false negatives. So, it should be OK to report them.

It took me more than 24 hours to realize my forum wasn't sending messages anymore. Reporting it would have helped me to fix the problem sooner.
Re: Log error when mail() returns FALSE [message #29932 is a reply to message #29930] Tue, 24 January 2006 14:32 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
On many PHP installs you will ALWAYS get negative responses, making logging of these errors utterly pointless. There are atleast 2 reasons in PHP why mail() may return FALSE but send the e-mail in reality.

FUDforum Core Developer
Re: Log error when mail() returns FALSE [message #29936 is a reply to message #29932] Tue, 24 January 2006 14:36 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
OK, point taken.

It will teach me to properly test the forum after making such changes.
icon4.gif  Re: Log error when mail() returns FALSE [message #35317 is a reply to message #29932] Thu, 28 December 2006 06:30 Go to previous messageGo to next message
viumido is currently offline  viumido   India
Messages: 1
Registered: December 2006
Location: USA
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
You touched on a problem I am having with PHP Mail(), that is it always returns "False" even though the mail is sending fine. Can you elaborate on this and what I can do about it? I'd really like to confirm at least that it 'may' be sending. What are the two reasons you hinted at? What is a common work-around?

Also, I tried to use the html mime version in the header, just want to use <b> tags on some of my text, and somewhere along the way it still arrives as plain text! Any ideas?? I've waisted TWO days on these two miserable issues.



Viumido
Re: Log error when mail() returns FALSE [message #35320 is a reply to message #35317] Thu, 28 December 2006 09:55 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
This is the case when PHP is compiled with --enable-sigchild flag. This flag activates the code that makes it impossible to determine the returned value of spawned binary. Subsequently mail() which internally spawns sendmail binary claims to fail even though it works.

FUDforum Core Developer
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: Double Emails
Next Topic: Private messages
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Oct 23 22:15:23 EDT 2017

Total time taken to generate the page: 0.00657 seconds