This error occurs due to numerous reasons.
There is no proper way to fix this error. Instead, try the actions below and see which one works for you.
The snippet shown below addresses the use of double-quotes. Therefore, you may use the snippet below and see if it resolves the error.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
$config = array( 'protocol' => "smtp", // make sure this is set as SMTP to enable connections to SMTP servers, else it will send via inbuilt php mail. 'smtp_host' => "your.smtp.host", // use double-quotes'smtp_port' => YOUR-PORT (as number),'smtp_user' => "YOUR-EMAIL-ADDRESS" 'smtp_pass' => "YOUR-EMAIL-PASSWORD", 'mailtype' => "text", 'charset' => "utf-8", 'wordwrap' => true, 'wrapchars' => 50, 'crlf' => "/r/n", 'newline' => "/r/n" ); $this->load->library('email'); // load mail library $this->email->initialize($config); // initialize with smtp configs $this->email->from('YOUR-SENDER-EMAIL'); $this->email->to('YOUR-RECIPIENT-EMAIL'); $this->email->subject('YOUR-SUBJECT'); $this->email->message('YOUR-BODY'); $this->email->send(); // email sent
View all errors
Send up to 10,000 notifications every month, for free.
Get started for free
Send up to 10,000 notifications every month, for free.
Get started for free
© 2024 Courier. All rights reserved.