Jump to content

imap_open - getting attached images


dweb

Recommended Posts

Hi

 

I have the following code, which works fine.

 

How can I pull in any images attached to the email and display them under the echo $val ?

 

Thanks

$mbox = imap_open("{SERVER}", "user", "pass");

echo "<h1>Mailboxes</h1>\n";
$folders = imap_listmailbox($mbox, "{SERVER}", "*");

if ($folders == false) {
    echo "Call failed<br />\n";
} else {
    foreach ($folders as $val) {
        echo $val . "<br />\n";
    }
}

echo "<h1>INBOX</h1>\n";
$headers = imap_headers($mbox);

if ($headers == false) {
    echo "Call failed<br />\n";
} else {
    $i=0;
    foreach ($headers as $val) {

$i++;

        echo $val . "<br />\n";
    }
}

imap_close($mbox);
Link to comment
https://forums.phpfreaks.com/topic/290964-imap_open-getting-attached-images/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.