Welcome Guest, Not a member yet? Register   Sign In
codeigniter email error: "Undefined index: Subject Filename: libraries/Email.php Line Number: 969"
#5

[eluser]rjm[/eluser]
Thanks for the help. It was many problems rolled into one. The first one being that it doesnt work on port 25 for some reason. Luckily my host had an alternative port I could use. This is what worked for me:

Code:
function send_email($customer_email, $client_email, $comment_string){
  //SEND EMAIL
  if($customer_email !== NULL && $client_email !== NULL){

   $message = "<p>Lorem ipsum dolor sit amet<br /> ".$comment_string."</p>";

   $config = Array(
    'protocol' => 'smtp',
    'smtp_host' => 'smtp.strato.com',
    'smtp_port' => 587,
    'smtp_user' => 'my email username',
    'smtp_pass' => 'MY EMAIL PASSWORD',
    'mailtype'  => 'html',
    'charset'   => 'utf-8'
   );
   $this->load->library('email', $config);
   $this->email->set_newline("\r\n");

   $this->email->from('my email username', 'NAME TEST');
   $this->email->to($client_email);

   $this->email->subject('SUBJECT HERE');
   $this->email->message($message);

   if ($this->email->send()) {
    return true;
   }else {
    show_error($this->email->print_debugger());
   }
  }
}


Messages In This Thread
codeigniter email error: "Undefined index: Subject Filename: libraries/Email.php Line Number: 969" - by El Forum - 02-20-2012, 03:51 AM



Theme © iAndrew 2016 - Forum software by © MyBB