Welcome Guest, Not a member yet? Register   Sign In
Cannot send mail with no "From" header.
#4

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');
$this->email->from('[email protected]');
$this->email->reply_to('[email protected]');
$this->email->to('[email protected]');
$this->email->subject($this->input->post('emailheading'));
$this->email->message($this->input->post('emailmessage'));
$this->email->set_alt_message($this->input->post('emailmessage'));
// $this->email->send(); don't do this and then the same thing!

 
if (!$this->email->send())
   
echo $this->email->print_debugger();
 
               

Reply


Messages In This Thread
RE: Cannot send mail with no "From" header. - by Avenirer - 01-20-2015, 12:02 AM



Theme © iAndrew 2016 - Forum software by © MyBB