Skip to content

Commit

Permalink
Update send_mail.py
Browse files Browse the repository at this point in the history
  • Loading branch information
yueyongyue authored Aug 6, 2019
1 parent 6e2dd20 commit 2f54cab
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions common/send_mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ def send_mail(to_addr, sub, content):
msg['From'] = "Saltshaker <%s>" % from_addr
msg['To'] = to_addr
msg['Subject'] = Header(sub, "utf-8")
if not smtp_port:
smtp_port = 25
server = smtplib.SMTP(smtp_server, smtp_port)
server = smtplib.SMTP(smtp_server, 25)
# server.set_debuglevel(1)
server.login(from_addr, password)
server.sendmail(from_addr, [to_addr], msg.as_string())
Expand Down

0 comments on commit 2f54cab

Please sign in to comment.