I have my application on a debian platform, which has been decoding these emails since March, which have not had any errors until today.
Attached is a screenshot of the email.
Captural of the email in command
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Bienvenido a Proyecto Test</title>
</head>
</head>
<body>
<p>Proyecto: Proyecto Test</p>
<p>Nombre: Tamara COFRÃ </p>
<p>Email: xxxxxxxx@gmail.com </p>
<p>Rut: xxxxxxx-x</p>
<p>Teléfono: 123456789</p>
<p>Modelo: Londres </p>
<p>¿Tienes crédito pre-aprobado?: No </p>
<p>¿Cuándo tienes pensado comprar?: Aún no lo tengo definido </p>
<p>¿Vivirás en esta propiedad o la arrendarás?: Vivir </p>
<p>¿Quieres solicitar?: Video llamada </p>
</body>
</html>
Method to extract information
$text = Html2txt::convert_html_to_text($html);
$html = iconv('UTF-8','ISO-8859-1',$text); // ERROR
Message error
ErrorException
iconv(): Detected an illegal character in input string
at C:\sites\laraveñ\app\Quote.php:827
823| case 'xxxx@xxxx.cl':
824| Log::channel('mailParse')->info("Proceso de parseo: Web Proyecto \n");
825|
826| $text = Html2txt::convert_html_to_text($html);
> 827| $html = iconv('UTF-8','ISO-8859-1',$text);
828|
829| preg_match('/Proyecto: (.*)/',$html,$proyecto);
830| preg_match('/Nombre: (.*)/',$html,$name);
831| preg_match('/Email: (.*)/',$html,$email);
1 C:\sites\laravel\app\Quote.php:827
iconv("UTF-8", "ISO-8859-1", "Proyecto: Proyecto Test