CodeIgniter Forums

Full Version: E-mail special characters
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]marcoslavorato[/eluser]
Hello folks! I'm trying to send a e-mail with E-mail library using the SMTP protocol and special characters like áéíó. The problem is that the e-mail sends without this special characters even using the UTF-8 config.

I'm using the Amazon SES.

Look the code.
Code:
//Libraries
  $ci->load->library('email');
  //Seta gMail
  $config['protocol'] = "smtp";
  $config['smtp_host'] = "ssl://";
  $config['smtp_user'] = "user";
  $config['smtp_pass'] = "pass";
  $config['smtp_port'] = "465";
  $config['smtp_timeout'] = 30;  
  $config['charset'] = "utf-8";
  $config['wordwrap'] = TRUE;
  $config['validate'] = TRUE;
  $config['mailtype'] = "html";
  $config['newline'] = "\r\n";
  $ci->email->initialize($config);
  //Carrega o modelo do e-mail
  $mensagem = $conteudo;
  //Seta variáveis
  $ci->email->from("[email protected]", $titulo);
  $ci->email->reply_to('[email protected]', 'New user');
  $ci->email->set_alt_message($conteudo);
  $ci->email->to($email_destino);
  $ci->email->subject($titulo);
  $ci->email->message($mensagem);
  $ci->email->send();