core icon indicating copy to clipboard operation
core copied to clipboard

python bindings: message.error isn't set despite permanent SMTP error

Open missytake opened this issue 4 years ago • 1 comments

  • Operating System (Linux/Mac/Windows/iOS/Android): Linux
  • Delta Chat Version: python bindings, master branch of this repository (commit f183f2d7046eeb5d84df0943461a2072bc1acf7f)
  • Expected behavior: when there is a permanent SMTP error and a message is failed, message.error is set to the error message.
  • Actual behavior: message.error is None
  • Steps to reproduce the problem:
    • try to send a 25MB large file with zohomail.eu, resulting in a message object
    • get the following log output: DC_EVENT_WARNING data1=0 data2=src/message.rs:1368: Msg#45 failed: Permanent SMTP error: permanent: 5.2.3 Mail Policy violation : Mail Size exceeds limit
    • realize that message.error is still None, even though https://github.com/deltachat/deltachat-core-rust/blob/f183f2d7046eeb5d84df0943461a2072bc1acf7f/src/message.rs#L1379 should set it to the error message, only few lines after the line which prompted the log output

missytake avatar Jan 11 '22 19:01 missytake

Did you maybe not re-load the Message object after it failed? After a Message object has been loaded from the db once, it doesn't change when the underlying message in the database changes. You have to call from_db() or similar again.

Hocuri avatar Jan 12 '22 14:01 Hocuri

closing stale issue, please reopen if the tipps of @Hocuri did not help.

r10s avatar Nov 30 '22 20:11 r10s