Open drkhunter opened 6 years ago
Where exactly do you mean? The attachments are handled by Zend\Mail\Message
.
I couldn't find attachment methods within Zend\Mail\Message
, looks like it might have been moved to zend-mime
?
I was trying to get the attachments and store them within the daemon script, but the zend message object wasn't giving me anything to work with.
To get around it I forked the repo to add https://github.com/php-mime-mail-parser/php-mime-mail-parser
Any clues?
I don't want do use Zend Message anyway, because the codebase of Zend is bad. Too many bugs.
I'll consider to replace Zend Message with something better for v0.8 release. Thank you for your contribution.
No problem. Looking forward to seeing what you go with.
@drkhunter One solution is on this line:
https://github.com/TheFox/smtpd/blob/master/src/Client.php#L473
Replace:
$zmail = Message::fromString($this->mail);
With:
$zmail = \Zend\Mime\Message::createFromMessage($this->mail)
Also need to change the method signature here (and in your implementation):
https://github.com/TheFox/smtpd/blob/master/src/Server.php#L344
Then the message parts should be accessible...
Also a suggestion for a Zend\Mime
/Zend\Message
alternative here: https://github.com/TheFox/smtpd/issues/20
Hey, do you have any plans to implement support for email attachments, or give some clues as to how this might be done?