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

Causes failure with AWS SES when sending RAW email with attachments #68

Closed
aalqadri opened this issue Feb 19, 2019 · 6 comments
Closed

Comments

@aalqadri
Copy link

Works great with AWS SES as long as you don't have attachments and must send email as RAW. When email is sent as RAW, text causes delivery failure.

@soundasleep
Copy link
Owner

Can you provide more information...? It sounds like a configuration or setup problem on your side. html2text is intended to work on HTML ONLY, not on e.g. MIME

@aalqadri
Copy link
Author

The library converts the HTML body of the email to text as expected. However, when attempting to send the email with an attachment, SES requires the email to be sent as RAW, and that causes delivery failure due to the error: smtp; 501 Syntax error - line too long

@soundasleep
Copy link
Owner

Can you provide any more information, such as your setup, the emails you are trying to send, how you're connecting to SES?

@aalqadri
Copy link
Author

We're using this library: https://github.com/daniel-zahariev/php-aws-ses
As long the email doesn't have an attachment, the email is sent with no issues, when an attachment is added, SES accepts the email and returns a message ID. However, we receive a delivery failure few seconds later with the above error message.

@soundasleep
Copy link
Owner

Thank you - how are you using html2text with that library? From what I can see that library doesn't depend on html2text directly.

@aalqadri
Copy link
Author

When sending an email, you have the option to send the html email as a text for older email clients that don't view html. Since our html emails are dynamically generated, we are converting the html to text and pass the html string and the text string to the library above.
Currently I'm using another html2txt library and it is working with no issues.

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