I’m working on an app in which I need to send emails at intervals. I’m using python’s smtplib. When I host the app locally, I have no issues, but when it’s deployed, I run into mysterious problems: Everything seems to go smoothly - the logs say the email has sent, no exceptions, I’ve even set smtplib’s log level to debug and can see that the entire SMTP client-server communication seems to be successful - but the emails never arrive. I think I’ve controlled for all other differences: same sender/receiver, same data being sent, etc. The only difference is where it’s hosted. Here’s an example of a minimal email app that causes me issues: https://minimal.streamlit.app/. Run locally, I receive the emails; hosted, I do not - identical in the logs. Any ideas? This may not properly be a streamlit-responsible issue, but I wondered if anyone else has had a similar problem when using streamlit.
Thank you! I had seen this post, and I don’t believe it’s relevant to the particular issue I’m having. The emails send just fine from a local instance (just not from the deployment on streamlit cloud) and this is a private mail server which doesn’t have any multifactor authentication or any such thing. All passwords etc. are set up the same locally and in the deployment. I was wondering if perhaps streamlit cloud is being blocked in some way from sending requests to send emails (although, like I said, the smtplib logs don’t suggest that). Is streamlit ever blacklisted in any way that you know of?
It seems to me that it has to do with our private mail server. My guess is that it is somehow flagging streamlit-hosted apps as insecure. I’m not sure why no errors are thrown, but seeing as how it works when deployed locally and I’ve exhausted implementation options, I think I’ll just have to either host a new mail server that I have more fine-grained control over or host my streamlit app elsewhere.
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.