Sending email with Python and smtplib and getting two duplicate emails
Python newb here. I am trying to send an email after processing a command. When I test, I get two duplicate emails compared to 1. My code is below.
import smtplib
import os.path
from email.mime.text import MIMEText
msg = MIMEText("The report at *link* has been updated")
msg['Subject'] = "Test Report Notification **TEST**"
#put your host and port here
s = smtplib.SMTP_SSL('###########.net:465')
s.login('system@#########','#####')
s.sendmail('system@#####.com','bryan#########', msg.as_string())
s.quit()
print("done")
Thanks in advance. I really tried to research.
+3
source to share
No one has answered this question yet
Check out similar questions: