You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am quite new in azure and facing issue in my deployed web app written in flask.
I have built a solution using flask where, user can send mail to my company mail box. The main code written on application.py is below
from flask import Flask, render_template
from flask_mail import Mail, Message
app = Flask(name)
app.config.update(
DEBUG=True,
MAIL_SERVER='My Company SMTP MAIL SERVER',
MAIL_PORT=My Company SMTP PORT NUMBER,
# MAIL_USE_SSL=True,
MAIL_USERNAME='[email protected]',
)
mail = Mail(app)
The sender mail address is shared mail and does not need password to send any mail. I already tested the solution on my pycharm IDE and worked totally fine without any issue. However, its throwing error on azure app service after deploying over there. Its saying gaierror'> [Errno -5] No address associated with hostname
Any suggestion on this please let me know.
FYI, I didnt mention my company SMTP server name and port number for data sensitivity
The text was updated successfully, but these errors were encountered:
Hi,
I am quite new in azure and facing issue in my deployed web app written in flask.
I have built a solution using flask where, user can send mail to my company mail box. The main code written on application.py is below
from flask import Flask, render_template
from flask_mail import Mail, Message
app = Flask(name)
app.config.update(
DEBUG=True,
MAIL_SERVER='My Company SMTP MAIL SERVER',
MAIL_PORT=My Company SMTP PORT NUMBER,
# MAIL_USE_SSL=True,
MAIL_USERNAME='[email protected]',
)
mail = Mail(app)
@app.route('/')
def mailSend():
try:
msg = Message("Send Mail Tutorial!",
sender="[email protected]",
recipients=["[email protected]"])
msg.html = render_template('linkPage.html')
mail.send(msg)
return 'Mail sent!'
except Exception as e:
print(type(e))
print(e)
return 'error'
The sender mail address is shared mail and does not need password to send any mail. I already tested the solution on my pycharm IDE and worked totally fine without any issue. However, its throwing error on azure app service after deploying over there. Its saying gaierror'> [Errno -5] No address associated with hostname
Any suggestion on this please let me know.
FYI, I didnt mention my company SMTP server name and port number for data sensitivity
The text was updated successfully, but these errors were encountered: