Ok, PHP documentation is extremely unclear on how to interpret e-mail messages. I want to find out whether the document has an attachment or not. By sending myself various e-mails and checking the numbers that show up I have come up with this code:
$message_structure = imap_fetchstructure($pop_connect,$i);
$count = count($message_structure->parts);
if ($count>1) $attach="Yes";
else $attach = "No";
I believe this is correct to some extent because when I sent images as attachment I would get the number 2, and plain text was just 0. and More than one image would just make the number go up for each image.
Am I on the right path?
Can anybody verify this?
Thanks,
Ron
$message_structure = imap_fetchstructure($pop_connect,$i);
$count = count($message_structure->parts);
if ($count>1) $attach="Yes";
else $attach = "No";
I believe this is correct to some extent because when I sent images as attachment I would get the number 2, and plain text was just 0. and More than one image would just make the number go up for each image.
Am I on the right path?
Can anybody verify this?
Thanks,
Ron