Search the Community
Showing results for tags 'php email imap'.
-
Morning All I'm in the process of creating an email app, and I'm having an issue extracting anything useful from a certain email. 99.99% of emails received work absolutely fine, however I cannot get any content from one. The structure returned from $structure = imap_fetchstructure($MailboxConnection, $email_number, 0); is object(stdClass)#5 (11) { ["type"]=> int(1) ["encoding"]=> int(0) ["ifsubtype"]=> int(1) ["subtype"]=> string(5) "MIXED" ["ifdescription"]=> int(0) ["ifid"]=> int(0) ["ifdisposition"]=> int(0) ["ifdparameters"]=> int(0) ["ifparameters"]=> int(1) ["parameters"]=> array(1) { [0]=> object(stdClass)#6 (2) { ["attribute"]=> string( "boundary" ["value"]=> string(33) "--_com.android.email_313497894392" } } ["parts"]=> array(1) { [0]=> object(stdClass)#7 (12) { ["type"]=> int(0) ["encoding"]=> int(3) ["ifsubtype"]=> int(1) ["subtype"]=> string(4) "HTML" ["ifdescription"]=> int(0) ["ifid"]=> int(0) ["lines"]=> int(26) ["bytes"]=> int(2068) ["ifdisposition"]=> int(0) ["ifdparameters"]=> int(0) ["ifparameters"]=> int(1) ["parameters"]=> array(1) { [0]=> object(stdClass)#8 (2) { ["attribute"]=> string(7) "charset" ["value"]=> string(5) "utf-8" } } } }} Which part should I extract with $data = imap_fetchbody($MailboxConnection, $email_number, '????'); Been on this for a while now, and getting nowhere fast so any help would be greatly appreciated. I've read the documentation, but it doesn't go into detail of identifying what part can be identified and extracted from the stucture information.