yiioverflow / yii2-imap

https://yiioverflow.com
BSD 3-Clause "New" or "Revised" License
41 stars 33 forks source link

function "alreadyProcesedMessage" is not working and get $mail->messageId empty #10

Closed yk134 closed 7 years ago

yk134 commented 7 years ago

I am using https://github.com/unyii2/yii2-imap extension to fetch incoming mails to my web app. it's based on yii2-imap , and facing issue with "alreadyProcesedMessage" function call

foreach( $mailIds as $mailId ) { $mail = $mailbox->getMail( $mailId ) ; print_r( $mail->id ) ;//<- $mail-id is Empty if( alreadyProcesedMessage( $mail->messageId ) ) { continue ; } $mailbox->readMailParts = false; $mail = $mailbox->getMailParts( $mail ) ; print_r( $mail ) ; $attachments = $mail->getAttachments(); die; // foreach( $attachments as $attachment ) { // echo ' Attachment:' . $attachment->name . PHP_EOL ; //unlink( $attachment->filePath ) ; // } }

yiioverflow commented 7 years ago

@yk134 Can you explain what issue you are facing pls ?

yiioverflow commented 7 years ago

can checkout the latest code pls ?