Added 'To:' header entry for outgoing mails

This commit is contained in:
Stefan Ritter 2009-07-28 10:36:44 +02:00
parent f238407d5e
commit 57ead80853

View File

@ -199,7 +199,7 @@ if cname and ctext and ctitle:
content.close()
# Send 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\nTo: ' + mail_to + '\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)
if smtp_user != '' and smtp_pass != '':
smtp.login(smtp_user, smtp_pass)