Imprimo el array por si nos puede dar mas pistas...
print_r(imap_fetchstructure($imap, $message));
Desde el webmail de GMAIL
More then one part
Attachment found!Filename: color-palet.PNG
Código php:
Ver originalstdClass Object
(
[type] => 1
[encoding] => 0
[ifsubtype] => 1
[subtype] => MIXED
[ifdescription] => 0
[ifid] => 0
[ifdisposition] => 0
[ifdparameters] => 0
[ifparameters] => 1
(
[0] => stdClass Object
(
[attribute] => BOUNDARY
[value] => 00504502cfc1f9d5590476ab665f
)
)
(
[0] => stdClass Object
(
[type] => 1
[encoding] => 0
[ifsubtype] => 1
[subtype] => ALTERNATIVE
[ifdescription] => 0
[ifid] => 0
[ifdisposition] => 0
[ifdparameters] => 0
[ifparameters] => 1
(
[0] => stdClass Object
(
[attribute] => BOUNDARY
[value] => 00504502cfc1f9d5510476ab665d
)
)
(
[0] => stdClass Object
(
[type] => 0
[encoding] => 0
[ifsubtype] => 1
[subtype] => PLAIN
[ifdescription] => 0
[ifid] => 0
[lines] => 1
[bytes] => 14
[ifdisposition] => 0
[ifdparameters] => 0
[ifparameters] => 1
(
[0] => stdClass Object
(
[attribute] => CHARSET
[value] => ISO-8859-1
)
)
)
[1] => stdClass Object
(
[type] => 0
[encoding] => 0
[ifsubtype] => 1
[subtype] => HTML
[ifdescription] => 0
[ifid] => 0
[lines] => 1
[bytes] => 18
[ifdisposition] => 0
[ifdparameters] => 0
[ifparameters] => 1
(
[0] => stdClass Object
(
[attribute] => CHARSET
[value] => ISO-8859-1
)
)
)
)
)
[1] => stdClass Object
(
[type] => 5
[encoding] => 3
[ifsubtype] => 1
[subtype] => PNG
[ifdescription] => 0
[ifid] => 0
[bytes] => 504
[ifdisposition] => 1
[disposition] => ATTACHMENT
[ifdparameters] => 1
(
[0] => stdClass Object
(
[attribute] => FILENAME
[value] => color-palet.PNG
)
)
[ifparameters] => 1
(
[0] => stdClass Object
(
[attribute] => NAME
[value] => color-palet.PNG
)
)
)
)
)
A continuación el otro...