Email sending problem |
[eluser]Cgull[/eluser]
Hello, I have a contact form on my site, but it does not send the email. I don't get any errors, it just goes back to the contact_view file, and does not send any email. my Controller: Code: class Contact extends CI_Controller { My email config file: Code: $config['to'] = '[email protected]'; Am I doing something wrong? Thanks
[eluser]Cgull[/eluser]
Thanks but where do I put this? I put it in the controller, but nothing is displaying.
[eluser]Cgull[/eluser]
Ok, managed to view the debugger error, tried with mail and with sendmail and both give me error: Your server might not be configured to send mail using this method. Wrote to my host. Thank you
[eluser]Cgull[/eluser]
Ok, the host said there was no recipient address. I changed this line: Code: $this->email->to($this->config->item('to','email_config')); to: Code: $this->email->to('myemailaddress') And now it works. Any idea why it didn't work the other way?
[eluser]InsiteFX[/eluser]
Because this is wrong! Code: $this->email->to($this->config->item('to','email_config')); Try this: Code: $config['email_to'] = '[email protected]'; |
Welcome Guest, Not a member yet? Register Sign In |