PrefectHQ / prefect

Prefect is a workflow orchestration framework for building resilient data pipelines in Python.
https://prefect.io
Apache License 2.0
15.82k stars 1.55k forks source link

Login username does not have to equal the actual email address #13093

Open drfraser opened 1 year ago

drfraser commented 1 year ago

This is a minor but possible problem. There is no requirement for the username used to authenticate to a SMTP server to equal the email address of the account logging in. e.g. the username could be "john.doe" or "something+john.doe@test.org" for the account using "john.doe@test.org". It all depends on how the email server has been set up. Username == email address is a common convention, but only that.

What this affects is line 83 in message.py --- message["From"] = email_from or email_server_credentials.username

If From is not a valid email address, then email servers like mine will conclude it is most likely a spammer and discard the mail.

Again, a nuance that probably won't affect the vast majority of users of this module, so probably not worth the effort to fix

ahuang11 commented 1 year ago

Thanks for the sharp eyes! At the moment, it seems like no one has reported this as an issue yet, so I plan on keeping it as it is, but if anyone does encounter this, let us know!