![]() |
Cannot send mail with no "From" header. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11) +--- Thread: Cannot send mail with no "From" header. (/showthread.php?tid=789) |
Cannot send mail with no "From" header. - mstojanov - 01-18-2015 Hello. I am using Codeigniter 3 and when i try to send email i get this error Cannot send mail with no "From" header. But the email still sends i got them in my mail. But when i use condition Code: if (!$this->email->send()) My preferences are located in the config/email.php Here is my code. Code: $this->load->library('email'); Any help will be appreciated RE: Cannot send mail with no "From" header. - mstojanov - 01-19-2015 Anyone ? RE: Cannot send mail with no "From" header. - apparasenal - 01-19-2015 What is the error you are getting? Can you paste it here so we can take a look. Thanks. RE: Cannot send mail with no "From" header. - Avenirer - 01-20-2015 In your code you've already used $this->email->send() before using again $this->email->send() in your if statement. The library, after you send an email, clears everything. So, if you want to do something in case of error you don't do the same method twice: PHP Code: $this->load->library('email'); |