Zend-mail use Pop3 and Imap but can not storage

Hello everybody, i have a issue, when i using zend-mail to send an email and i want to storage into “sent” folder of email. I try to use Pop3 and Imap but can not storage, Please help me!

Sending mails is just directly shooting them to their recipient, not to any mailbox/dispatcher:

https://github.com/zendframework/zend-mail/blob/ece418b37aaf8a98c991d7f0c198408043a2172d/src/Transport/TransportInterface.php#L23

Smtp (https://github.com/zendframework/zend-mail/blob/ece418b37aaf8a98c991d7f0c198408043a2172d/src/Transport/Smtp.php) and SendMail (https://github.com/zendframework/zend-mail/blob/ece418b37aaf8a98c991d7f0c198408043a2172d/src/Transport/Sendmail.php) are very simplistic transports.

If you want mails to go to an intermediate dispatcher that is responsible for storing anything passing through, I suggest using a middleware that acts as an SMTP server listening for outgoing traffic, and which simply forwards any mail.

1 Like