Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attachments #12

Open
drkhunter opened this issue Jan 25, 2018 · 5 comments
Open

Attachments #12

drkhunter opened this issue Jan 25, 2018 · 5 comments
Milestone

Comments

@drkhunter
Copy link

Hey, do you have any plans to implement support for email attachments, or give some clues as to how this might be done?

@TheFox
Copy link
Owner

TheFox commented Feb 3, 2018

Where exactly do you mean? The attachments are handled by Zend\Mail\Message.

@drkhunter
Copy link
Author

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?

@TheFox
Copy link
Owner

TheFox commented Feb 3, 2018

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.

@TheFox TheFox added this to the v0.8 milestone Feb 3, 2018
@drkhunter
Copy link
Author

No problem. Looking forward to seeing what you go with.

@groovenectar
Copy link

@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: #20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants