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

Can't send emails from Gmail address #84

Open
dmichalski opened this issue Apr 27, 2024 · 1 comment
Open

Can't send emails from Gmail address #84

dmichalski opened this issue Apr 27, 2024 · 1 comment

Comments

@dmichalski
Copy link

I'm Running Opentrashmail 1.4.6. Unfortunately trying to send an email to Opentrashmail results in the following log output:

2024-04-27 11:53:51,904 - __main__ - DEBUG - Message addressed from: xxx@gmail.com 2024-04-27 11:53:51,904 - __main__ - DEBUG - Message addressed to: ['something@mydomain.com'] ('209.85.214.176', 47330) SMTP session exception Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/aiosmtpd/smtp.py", line 753, in _handle_client await method(arg) File "/usr/lib/python3.11/site-packages/aiosmtpd/smtp.py", line 1516, in smtp_DATA status = await self._call_handler_hook('DATA') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/aiosmtpd/smtp.py", line 473, in _call_handler_hook status = await hook(self, self.session, self.envelope, *args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/var/www/opentrashmail/python/mailserver3.py", line 76, in handle_DATA html += part.get_payload().get_payload(decode=True).decode('utf-8') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'str' object has no attribute 'get_payload'

I can manually Telnet the SMTP server and successfully send an email. I just have port 25 exposed and no valid TLS certificate installed yet. Any ideas?

@dmichalski
Copy link
Author

Ok, this is not a Gmail problem. I can reproduce the issue by using the testmail.txt from the repo. I think the problem can be boiled down to the parsing of Content Type text/html. The testmail is accepted unless I add the html part from the txt. Even the SVG is working.

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

1 participant