From 6a30220c8f3287bd7f970e80e22e2f061fe8d415 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 28 May 2022 13:24:35 +0530 Subject: [PATCH] Dont use commas in filenames when sending to pbsync and kindle email addresses --- src/calibre/gui2/email.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/email.py b/src/calibre/gui2/email.py index da6b81edec..dc9a61dee8 100644 --- a/src/calibre/gui2/email.py +++ b/src/calibre/gui2/email.py @@ -154,10 +154,10 @@ def send_mails(jobnames, callback, attachments, to_s, subjects, attachments, to_s, subjects, texts, attachment_names): description = _('Email %(name)s to %(to)s') % dict(name=name, to=to) if isinstance(to, str) and ('@pbsync.com' in to or '@kindle.com' in to): - # The pbsync service chokes on non-ascii filenames + # The pbsync service chokes on non-ascii filenames and commas # Dont know if amazon's service chokes or not, but since filenames # arent visible on Kindles anyway, might as well be safe - aname = ascii_filename(aname) + aname = ascii_filename(aname).replace(',', ' ') job = ThreadedJob('email', description, gui_sendmail, (attachment, aname, to, subject, text), {}, callback) job_manager.run_threaded_job(job)