note 22599 added to function.imap-fetchstructure
| From: | kmakaveev@php.net | Date: | Mon, 24 Jun 2002 15:54:57 +0000 |
| Subject: | note 22599 added to function.imap-fetchstructure | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-32153@lists.php.net to get a copy of this message | ||
There's a simple way to check weither a particular mail message has an attachment or not.
I'm not sure that it is 100% true but here it is a sample code:
<?
$msg_structure = imap_fetchstructure($mail_inbox, $msg_id);
if($msg_structure->bytes == "")
{
echo "The message has attachment!";
}
else
{
echo "The message has attachment!";
}
?>
Please, test this code and let me know is it working properly or not! Thanks in advance!
--
http://www.php.net/manual/en/function.imap-fetchstructure.php
http://master.php.net/manage/user-notes.php?action=edit+22599
http://master.php.net/manage/user-notes.php?action=delete+22599
http://master.php.net/manage/user-notes.php?action=reject+22599