Made SMTP Auth actually functional
This commit is contained in:
parent
8d77719cee
commit
743cb0f08b
@ -200,6 +200,8 @@ if cname and ctext and ctitle:
|
|||||||
if new_comment_mail:
|
if new_comment_mail:
|
||||||
msg = 'From: Blogthon\nSubject: New comment on ' + blog_title + '\n\nSomeone wrote a comment to this entry: ' + blog_url + '?p=' + re.sub(' ', '-', ctitle)
|
msg = 'From: Blogthon\nSubject: New comment on ' + blog_title + '\n\nSomeone wrote a comment to this entry: ' + blog_url + '?p=' + re.sub(' ', '-', ctitle)
|
||||||
smtp = smtplib.SMTP(smtp_host)
|
smtp = smtplib.SMTP(smtp_host)
|
||||||
|
if smtp_user != '' and stmp_pass != '':
|
||||||
|
smtp.login(smtp_user, smtp_pass)
|
||||||
smtp.sendmail(blog_title, mail_to, msg)
|
smtp.sendmail(blog_title, mail_to, msg)
|
||||||
smtp.quit()
|
smtp.quit()
|
||||||
|
|
||||||
|
@ -21,5 +21,5 @@ newest_first: True
|
|||||||
new_comment_mail= False
|
new_comment_mail= False
|
||||||
mail_to= please@change.me!!!
|
mail_to= please@change.me!!!
|
||||||
smtp_host= localhost
|
smtp_host= localhost
|
||||||
smtp_user= changeme
|
smtp_user=
|
||||||
smtp_pass= changeme
|
smtp_pass=
|
||||||
|
Loading…
Reference in New Issue
Block a user