mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04: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
@ -101,8 +101,10 @@ class Sendmail(object):
|
||||
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…
x
Reference in New Issue
Block a user