How do i send email from Azure function app
问题 I have running Azure function App(in python language), for business requirements need to send emails from function app. for that, I wrote a python function from email.message import EmailMessage import smtplib def send_mail(): # message to be sent msg = EmailMessage() msg.set_content('Test content') msg['Subject'] = 'Test' msg['From'] = "test@hotmail.com" msg['To'] = ["test@hotmail.com"] # creates SMTP session s = smtplib.SMTP('smtp-mail.outlook.com', 587) s.ehlo() # start TLS for security s