mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Email delivery: When sending emails to Kindle's dont convert filenames to English letters as Amazon appears to have finally fixed their email servers to handle non-English filenames.
Fixes #2378 (use ebook title (name) as the email attachment name)
This commit is contained in:
parent
e62f7427b4
commit
d1589e00f3
@ -167,11 +167,10 @@ def send_mails(jobnames, callback, attachments, to_s, subjects,
|
|||||||
# irony that they are called "tech" companies.
|
# irony that they are called "tech" companies.
|
||||||
# https://bugs.launchpad.net/calibre/+bug/1989282
|
# https://bugs.launchpad.net/calibre/+bug/1989282
|
||||||
from calibre.utils.short_uuid import uuid4
|
from calibre.utils.short_uuid import uuid4
|
||||||
if is_for_kindle(to):
|
if not is_for_kindle(to):
|
||||||
|
# Amazon nowadays reads metadata from attachment filename instead of
|
||||||
|
# file internal metadata so dont nuke the filename.
|
||||||
# https://www.mobileread.com/forums/showthread.php?t=349290
|
# https://www.mobileread.com/forums/showthread.php?t=349290
|
||||||
from calibre.utils.filenames import ascii_filename
|
|
||||||
aname = ascii_filename(aname)
|
|
||||||
else:
|
|
||||||
aname = f'{uuid4()}.' + aname.rpartition('.')[-1]
|
aname = f'{uuid4()}.' + aname.rpartition('.')[-1]
|
||||||
subject = uuid4()
|
subject = uuid4()
|
||||||
text = uuid4()
|
text = uuid4()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user