Commit b488af4c authored by idalin's avatar idalin

Merge branch 'master' into prod

parents a09a2d9e 9020c358
...@@ -19,6 +19,8 @@ from email.MIMEBase import MIMEBase ...@@ -19,6 +19,8 @@ from email.MIMEBase import MIMEBase
from email.MIMEMultipart import MIMEMultipart from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText from email.MIMEText import MIMEText
from email.generator import Generator from email.generator import Generator
from email.utils import formatdate
from email.utils import make_msgid
from flask_babel import gettext as _ from flask_babel import gettext as _
import subprocess import subprocess
import threading import threading
...@@ -165,6 +167,8 @@ def send_mail(book_id, kindle_mail, calibrepath): ...@@ -165,6 +167,8 @@ def send_mail(book_id, kindle_mail, calibrepath):
# create MIME message # create MIME message
msg = MIMEMultipart() msg = MIMEMultipart()
msg['Subject'] = _(u'Send to Kindle') msg['Subject'] = _(u'Send to Kindle')
msg['Message-Id'] = make_msgid('calibre-web')
msg['Date'] = formatdate(localtime=True)
text = _(u'This email has been sent via calibre web.') text = _(u'This email has been sent via calibre web.')
msg.attach(MIMEText(text.encode('UTF-8'), 'plain', 'UTF-8')) msg.attach(MIMEText(text.encode('UTF-8'), 'plain', 'UTF-8'))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment