Domanda

Dal manuale, so che ci sono 6 diverse codifiche di trasferimento in IMAP.

A questo punto, ho creato questa funzione di base:

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;
    }
}

La mia domanda è: come posso tradurre 8 bit, binario e altre codifiche in un modulo di messaggio leggibile? O forse qualcuno ha funzioni migliori per gestirlo?

È stato utile?

Soluzione

Per tradurre il tuo binario a 8 bit in leggibile, prova questo:

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top