aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsource/utils.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/utils.py b/source/utils.py
index f2756286..577304db 100755
--- a/source/utils.py
+++ b/source/utils.py
@@ -171,13 +171,13 @@ def send_mail(mfrom, mto, feed_title, article_title, description):
try:
s = smtplib.SMTP(conf.smtp_server)
s.login(conf.username, conf.password)
- except:
- print("smtp error")
+ # sendmail function takes 3 arguments: sender's address, recipient's address
+ # and message to send - here it is sent as one string.
+ s.sendmail(mfrom, mto, msg.as_string())
+ s.quit()
+ except Exception as e:
+ print(e)
return
- # sendmail function takes 3 arguments: sender's address, recipient's address
- # and message to send - here it is sent as one string.
- s.sendmail(mfrom, mto, msg.as_string())
- s.quit()
def add_feed(feed_url):
"""
bgstack15