Closed unicode-it closed 2 years ago
See pull request.
Hi, could you please further prove actual behaviour does not work? It seems to my SomeException
is correctly raised when sending fails now. Thanks!
I tried the following:
I set a wrong sender address to test it. The smtp server refused to send the mail. The error was correctly logged via logger. But the check still evaluated to true.
I actually oversaw the implementation of __bool__
method, but still it does not evaluate to false even though the message is not send.
check still evaluated to true
Post the code you've tried please. I wonder to see how come it evaluated to True.
from envelope import Envelope
e = Envelope("dummy")
print(bool(e)) # False
e.to("test@example.com")
print(bool(e)) # False
e.sender(False)
e.send()
print(bool(e)) # False
No reaction, closing for now
Docstring of send-method:
To check e-mail was successfully sent, cast the returned object to bool.
Expected behaviour:
Should raise SomeException if send fails.
Actual behaviour:
No way to check if sending was succesfull. No Exception raised.