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 fetching attachment copies.
On my one mail there is only one attachment but when i am parsing it's result array,
$imapConnection = new \unyii2\imap\ImapConnection;
$imapConnection->imapPath = '{imap.gmail.com:993/imap/ssl}INBOX' ;
$imapConnection->imapLogin = 'valid-email-address' ;
$imapConnection->imapPassword = 'password' ;
$imapConnection->serverEncoding = 'utf-8' ;
$imapConnection->attachmentsDir = 'Directory location' ;
$mailbox = new \unyii2\imap\Mailbox( $imapConnection ) ;
$mailIds = $mailbox->searchMailBox( UNSEEN ) ;
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 fetching attachment copies. On my one mail there is only one attachment but when i am parsing it's result array, $imapConnection = new \unyii2\imap\ImapConnection; $imapConnection->imapPath = '{imap.gmail.com:993/imap/ssl}INBOX' ; $imapConnection->imapLogin = 'valid-email-address' ; $imapConnection->imapPassword = 'password' ; $imapConnection->serverEncoding = 'utf-8' ; $imapConnection->attachmentsDir = 'Directory location' ; $mailbox = new \unyii2\imap\Mailbox( $imapConnection ) ; $mailIds = $mailbox->searchMailBox( UNSEEN ) ;
foreach( $mailIds as $mailId ) { $mail = $mailbox->getMail( $mailId ) ; $mailbox->readMailParts = false; $mail = $mailbox->getMailParts( $mail ) ; $attachments = $mail->getAttachments(); }
Here i am getting two copy of attachments for single email but actually there is only one attachment.
can any one help out for this ?