aboutsummaryrefslogtreecommitdiff
path: root/utils.py
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2010-03-23 14:55:55 +0100
committercedricbonhomme <devnull@localhost>2010-03-23 14:55:55 +0100
commitcca6bdb9970651d44cdc360c89c6d24443520d58 (patch)
tree1e9cc44b0d4a35e57283bfc5d8ce4dda14389c05 /utils.py
parentMinor bug fix. (diff)
downloadnewspipe-cca6bdb9970651d44cdc360c89c6d24443520d58.tar.gz
newspipe-cca6bdb9970651d44cdc360c89c6d24443520d58.tar.bz2
newspipe-cca6bdb9970651d44cdc360c89c6d24443520d58.zip
Minor improvements for the e-mail notification.
Diffstat (limited to 'utils.py')
-rwxr-xr-xutils.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/utils.py b/utils.py
index e0011edd..25031317 100755
--- a/utils.py
+++ b/utils.py
@@ -44,7 +44,9 @@ path = config.get('global','path')
sqlite_base = os.path.abspath(config.get('global', 'sqlitebase'))
mail_from = config.get('mail','mail_from')
mail_to = config.get('mail','mail_to')
-mail_smtp = config.get('mail','smtp')
+smtp_server = config.get('mail','smtp')
+username = config.get('mail','username')
+password = config.get('mail','password')
def detect_language(text):
@@ -137,7 +139,8 @@ def send_mail(mfrom, mto, feed_title, message):
mail['Subject'] = '[pyAggr3g470r] News from ' + feed_title
#email['Text'] = message
- server = smtplib.SMTP(mail_smtp)
+ server = smtplib.SMTP(smtp_server)
+ server.login(username, password)
server.sendmail(mfrom, \
mto, \
mail.as_string())
bgstack15