Weird behaviour of mail() function |
[eluser]verisof[/eluser]
Hi all, I found a very strange thing, hope someone can explain this. I had a problem with sending email via Email class. It was always ending with FALSE when it came to mail(...) part. So I tried to put my testing simple mail() function to different places. I used this test code: Code: mail("[email protected]","testmessage","testmessage") 1) When I put it to index.php before the first CI code, it worked 2) When I put it to codeigniter/CodeIgniter.php after sending all the output, it worked 3) When I put it to my controller class before the parent::Controller(); call in the constructor, it worked 4)And finally, when I put it anywhere after the parent::Controller(); call (just after it, in some function, anywhere in the Email class it didn't work (when I say it worked, it means that the email arrived and thu function returned TRUE) I must add, that I never changed anything "inside" CI or Email class. It seems that right after parent::Controller(); call, the mail() function stops working. I searched my project to find out if I didn't override it by an accident, but nothing like this happened. I used Email class to send emails succesfully before, but now I can't say what is going on. Any idea someone? |
Messages In This Thread |
Weird behaviour of mail() function - by El Forum - 05-07-2009, 09:59 AM
Weird behaviour of mail() function - by El Forum - 05-07-2009, 10:45 AM
Weird behaviour of mail() function - by El Forum - 05-07-2009, 11:07 AM
Weird behaviour of mail() function - by El Forum - 05-07-2009, 11:25 AM
|