Pregunta

Del manual, sé que hay 6 codificaciones de transferencia diferentes en IMAP.

En este punto, he creado esta función básica:

function translate_imap_body($body, $encoding) {
    switch($encoding) {
        case 0: return $body;break;
        case 1: return $body;break;
        case 2: return $body;break;
        case 3: return base64_decode($body);break;
        case 4: return quoted_printable_decode($body);break;
        case 5: return $body;break;
    }
}

Mi pregunta es, ¿cómo traduzco la codificación de 8 bits, binaria y de otro tipo al mensaje legible por humanos? ¿O tal vez alguien tiene mejores funciones para manejar esto?

¿Fue útil?

Solución

Para traducir su binario de 8 bits a legible para humanos, intente esto:

http://www.php.net/manual /en/function.quoted-printable-encode.php

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top