Email library : mail() function issue |
[eluser]metalking[/eluser]
Hi everybody! I'm just trying to build a mail module for my application (some kind of newsletter), and I'm having some problems with the Email library. When I try to send a mail using the method described in the user guide, I get a PHP warning, saying that in libraries/Email.php, at line 1232, the mail() function receives a wrong number of parameters. My CI code : Code: $this->load->library('email'); Don't care about vars names and so on, the only error I get (at the moment) is this PHP error, which says CI sends a wrong number of parameters to the mail() function. Have you any idea of what the problem is? Thanks !
[eluser]optimal[/eluser]
Hello, Have you verified that all the necessary parameters have values? I notice a reference above to "sujet." Is that correct?
[eluser]metalking[/eluser]
Yeah, I'm just a frenchie ^^ "Sujet" means "Subject", and is defined by form (validated by the validation class, so it is not empty). I'm pretty sure all parameters have values... Any idea?
[eluser]metalking[/eluser]
It's OK, I'm sure all params have values (verified with echo's of my values). Any idea?
[eluser]sophistry[/eluser]
you have to echo the params at the point of the error if you want to fix it. have you done that? i'd be surprised if the PHP parser complained about missing parameters if there were no missing parameters. that is, check the parameter values exactly where the error is thrown.
[eluser]metalking[/eluser]
Hi! This problem is OK now (I really don't know how, but the mail() error is solved). However, I have new PHP warnings : Quote:A PHP Error was encountered And Quote:A PHP Error was encountered It seems to be about SMTP (looking in the Email.php). Is there something particular with Gmail? I know it needs a SSL connexion, but don't know how to set it (appart from the port, that must be 465). Does someone know how to send SMTP mails with Gmail? Thanks !
[eluser]optimal[/eluser]
I haven't done this but would like to for testing purposes. From some reading it appears you may need to install OpenSSL, and (re)compile PHP with OpenSSL support. Some links I found: http://www.codingforums.com/showthread.php?p=576443 http://us.php.net/openssl http://drupal.org/node/132888 If this is true, it sounds like quite the little afternoon project . . . |
Welcome Guest, Not a member yet? Register Sign In |