Closed amcgregor closed 7 years ago
Traceback (most recent call last):
File "mtest.py", line 24, in <module>
msg.send()
File "/Users/amcgregor/Library/Environments/marrow/lib/python3.4/site-packages/marrow/mailer/message.py", line 332, in send
return self.mailer.send(self)
File "/Users/amcgregor/Library/Environments/marrow/lib/python3.4/site-packages/marrow/mailer/__init__.py", line 146, in send
result = self.manager.deliver(message)
File "/Users/amcgregor/Library/Environments/marrow/lib/python3.4/site-packages/marrow/mailer/manager/immediate.py", line 43, in deliver
result = transport.deliver(message)
File "/Users/amcgregor/Library/Environments/marrow/lib/python3.4/site-packages/marrow/mailer/transport/smtp.py", line 105, in deliver
self.send_with_smtp(message)
File "/Users/amcgregor/Library/Environments/marrow/lib/python3.4/site-packages/marrow/mailer/transport/smtp.py", line 114, in send_with_smtp
content = bytes(message)
TypeError: 'Message' object is not iterable
The above traceback occurs with a minimal (immediate, smtp) test case under Python 3.4, and likely earlier Python versions in the 3.x branch.
Additionally, the following traceback occurs when using Mailgun SMTP delivery with forced SSL: (mail.transport.tls=ssl
and mail.transport.port=465
)
Delivery of message <20150127231531.4298.74643@Lucifer.local> failed.
Traceback (most recent call last):
File "/Users/amcgregor/Library/Environments/marrow/lib/python3.4/site-packages/marrow/mailer/manager/util.py", line 50, in __enter__
transport = pool.transports.get(False)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/queue.py", line 164, in get
raise Empty
queue.Empty
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "mtest.py", line 24, in <module>
msg.send()
File "/Users/amcgregor/Library/Environments/marrow/lib/python3.4/site-packages/marrow/mailer/message.py", line 332, in send
return self.mailer.send(self)
File "/Users/amcgregor/Library/Environments/marrow/lib/python3.4/site-packages/marrow/mailer/__init__.py", line 146, in send
result = self.manager.deliver(message)
File "/Users/amcgregor/Library/Environments/marrow/lib/python3.4/site-packages/marrow/mailer/manager/immediate.py", line 41, in deliver
with self.transport() as transport:
File "/Users/amcgregor/Library/Environments/marrow/lib/python3.4/site-packages/marrow/mailer/manager/util.py", line 57, in __enter__
transport.startup()
File "/Users/amcgregor/Library/Environments/marrow/lib/python3.4/site-packages/marrow/mailer/transport/smtp.py", line 50, in startup
self.connect_to_server()
File "/Users/amcgregor/Library/Environments/marrow/lib/python3.4/site-packages/marrow/mailer/transport/smtp.py", line 78, in connect_to_server
connection.connect(self.host, self.port)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/smtplib.py", line 321, in connect
self.sock = self._get_socket(host, port, self.timeout)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/smtplib.py", line 920, in _get_socket
server_hostname=server_hostname)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/ssl.py", line 364, in wrap_socket
_context=self)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/ssl.py", line 578, in __init__
self.do_handshake()
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/ssl.py", line 805, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: TLSV1_ALERT_DECODE_ERROR] tlsv1 alert decode error (_ssl.c:600)
From @nandoflorestan on IRC:
I am trying to do my part for open source development and I need marrow.mailer to work on Python 3.4, so I went ahead and created a py34 branch in my fork of marrow.mailer, but many tests are failing even on Python 2.7. Looks like this is being developed without any attention to the automated tests! I would appreciate some help on getting them all to pass when you have some time.
https://github.com/nandoflorestan/marrow.mailer/tree/py34
I already have some commits on the branch linked above.
Any progress on this?
Issues with SMTPlib and
str
vs.bytes
header values; specifically those of the address values such asFrom
.Needs more research on Python 3's smtp library. On the following MIME message:
I'm getting: