mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 22:53:38 +02:00
Sending books by email: Allow sending to multiple email addresses at once separated by commas. Fixes #1052332 (Multiple email recipients not receiving ebooks)
This commit is contained in:
parent
f56b251b9f
commit
e5d0bd2a89
1 changed files with 4 additions and 2 deletions
|
|
@ -101,8 +101,10 @@ def sendmail(self, attachment, aname, to, subject, text, log):
|
|||
from_ = 'calibre <calibre@'+socket.getfqdn()+'>'
|
||||
with lopen(attachment, 'rb') as f:
|
||||
msg = compose_mail(from_, to, text, subject, f, aname)
|
||||
efrom, eto = map(extract_email_address, (from_, to))
|
||||
eto = [eto]
|
||||
efrom = extract_email_address(from_)
|
||||
eto = []
|
||||
for x in to.split(','):
|
||||
eto.append(extract_email_address(x.strip()))
|
||||
sendmail(msg, efrom, eto, localhost=None,
|
||||
verbose=1,
|
||||
relay=opts.relay_host,
|
||||
|
|
|
|||
Loading…
Reference in a new issue