2013-11-25 73 views
1

我想下載到從我的電子郵件與圖片作爲附件(POP3 IMAP)笨訪問電子郵件

sender 
sender_email_address 
subject 
Message 
attachments = array(
     all attachments 
) 

任何庫中的下列信息?建議?鏈接?

+1

試過官方PHP IMAP擴展:http://us3.php.net/manual/en/book.imap.php? – Filou

+0

其實,我正在尋找CI庫,可以給我的工作提供一點點促進 –

回答

0

這裏是可以使用的庫..

http://garrettstjohn.com/entry/reading-emails-with-php/

加上訪問該庫,提取電子郵件及其附件

http://garrettstjohn.com/entry/extracting-attachments-from-emails-with-php/

東西在這個提取中失蹤,是一個處理圖像的功能,所以我必須這樣做...

function _process_img($attach, $ext){ 

    $directory = "uploads"; 

    $path=realpath(APPPATH."../".$directory); 
    $file_name="any_name_you_want_to_give".".".$ext; 

    $file=$directory.$file_name; 
    if(file_put_contents($path."/".$file_name, $attach)) return $file; 
} 

希望這將幫助別人太...