Message: mail() [function.mail]: Bad parameters to mail() function, mail not sent - Can You Help? |
[eluser]Stephane02[/eluser]
I just tried to send an html e-mail using the e-mail library in CodeIgniter and it reported the following error (sending text e-mail works fine). Can you help? Here is the exact error I got: Code: A PHP Error was encountered Here's my code: Code: $mconfig['useragent'] = 'My Mail Agent'; Thx for helping Stephane
[eluser]Đaяк Đaηтє[/eluser]
Are you loading Email class? http://ellislab.com/codeigniter/user-gui...email.html
[eluser]Stephane02[/eluser]
Yes, I'm loading it in config/autoload.php /* | ------------------------------------------------------------------- | Auto-load Libraries | ------------------------------------------------------------------- | These are the classes located in the system/libraries folder | or in your system/application/libraries folder. | | Prototype: | | $autoload['libraries'] = array('database', 'session', 'xmlrpc'); */ $autoload['libraries'] = array('database', 'session', 'image_lib', 'recaptcha', 'form_validation', 'encrypt', 'email');
[eluser]WanWizard[/eluser]
Try one of both of these: Code: $mconfig['crlf'] = "\r\n"; Some mailservers require CRLF line-ends instead of only LF (which is the email library default).
[eluser]ngatcharius[/eluser]
Code: $config['wordwrap'] = TRUE; it doesn't work i have same error !!! at the beginning when i'm not 'initialize' email $config it works but after it does not why??
[eluser]WanWizard[/eluser]
Something is malformed. If it's not the crlf or newline setting, it could be something in your message. Try Code: $this->email->message( "<html><body>Hello</body></html>" ); // $msg contains the html body Does this get send?
[eluser]ngatcharius[/eluser]
noooo !! same problem Code: A PHP Error was encountered
[eluser]ngatcharius[/eluser]
another way! i send email to many adress like Code: foreach ($list as $name => $address) when i use $this->email->clear(); $config is also clear?? will i put $config in loop ? |
Welcome Guest, Not a member yet? Register Sign In |