• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Email error - MessageFormatter::formatMessage(): Creating message formatter failed

#1
Hello all

I use email library of Codeigniter 4, the email is sent successfully but this error appears:

Quote:MessageFormatter::formatMessage(): Creating message formatter failed
SYSTEMPATH/Language/Language.php at line 248

This is my code:


Code:
    $config['protocol'] = 'smtp';
    $config['SMTPHost'] = 'smtp.mailtrap.io';
    $config['SMTPUser'] = 'xxxxxxxxxxxxxx';
    $config['SMTPPass'] = 'xxxxxxxxxxxxxx';
    $config['SMTPPort'] = 25;
    $config['SMTPCrypto'] = 'tls';
    $config['mailType'] = 'html';
    $config['charset'] = 'utf-8';
    $config['CRLF'] = "\r\n";
    $config['newline'] = "\r\n";

    $email = \Config\Services::email();
    $email->initialize($config);

    $email->setFrom('[email protected]');
    $email->setTo('[email protected]');
    $email->setSubject('Asunto de Prueba');
    $email->setMessage('Texto de Prueba...');

    $email->send();

I attach the image of error.


I appreciate your help in advance.

Regards


Attached Files Thumbnail(s)
   
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.