diff --git a/src/calibre/gui2/email.py b/src/calibre/gui2/email.py index dfad6542a1..c6d58fa340 100644 --- a/src/calibre/gui2/email.py +++ b/src/calibre/gui2/email.py @@ -22,6 +22,7 @@ from calibre.customize.ui import available_input_formats, available_output_forma from calibre.ebooks.metadata import authors_to_string from calibre.constants import preferred_encoding from calibre.gui2 import config, Dispatcher, warning_dialog +from calibre.library.save_to_disk import get_components from calibre.utils.config import tweaks class EmailJob(BaseJob): # {{{ @@ -242,6 +243,10 @@ class EmailMixin(object): # {{{ if not subject: subjects.append(_('E-book:')+ ' '+t) else: + components = get_components(subject, mi, id) + if not components: + components = [mi.title] + subject = os.path.join(*components) subjects.append(subject) a = authors_to_string(mi.authors if mi.authors else \ [_('Unknown')]) diff --git a/src/calibre/gui2/preferences/emailp.py b/src/calibre/gui2/preferences/emailp.py index 2b81a0060a..aff1ce5c47 100644 --- a/src/calibre/gui2/preferences/emailp.py +++ b/src/calibre/gui2/preferences/emailp.py @@ -29,7 +29,9 @@ class EmailAccounts(QAbstractTableModel): # {{{ self.tooltips =[NONE] + map(QVariant, [_('Formats to email. The first matching format will be sent.'), _('Subject of the email to use when sending. When left blank ' - 'the title will be used for the subject.'), + 'the title will be used for the subject. Also, the same ' + 'templates used for "Save to disk" such as {title} and ' + '{author_sort} can be used here.'), '

'+_('If checked, downloaded news will be automatically ' 'mailed
to this email address ' '(provided it is in one of the listed formats).')])