this is the content of one mail read by the imap_php library. I would extract text like text / plain; charset = ISO-8859-1 text:
{"data":"10/10/2011","regione":"pt","provincia":"pistoia","nome":"nome","tel":"12345","email":"mymailaddress","richiesta":"qualcosa"}
If I use imap_body ($ mbox, $ result [0]), I returned all the text in the field. If I use imap_fetchbody ($ mbox, $ email_number, 2); I returned a text / html body message that I don't need.
- 20cf301e2f27a218c204a88578aa Content-Type: text / plain; Encoding = ISO-8859-1 {"Data": "10.10.2011", "Regione": "Fri", "Provincia": "Pistoia", "Noma": "Noma", "Body": "12345", "email": "mymailaddress", "Richiesta": "qualcosa"}
- 20cf301e2f27a218c204a88578aa Content-Type: text / html; charset = ISO-8859-1 Content-Transfer-Encoding: quoted-printed {"data &": "10/10/2011", "regione": "pt", "provi = NCIA": "Pistoia" "nome" : "noma", "tel & =" 12345 "," email ":" mymailaddress "," r = ichiesta ":" qualcosa "} --20cf301e2f27a218c204a88578aa -
So what should I use if I want text / body? Thank.
source
share