reformatted mail

This commit is contained in:
Ronald Schaten 2013-03-19 20:24:49 +01:00
parent 724ab03563
commit bc1b0655e0
2 changed files with 6 additions and 8 deletions

View File

@ -6,7 +6,7 @@ hostname = localhost
database = atomstrom
[email]
sender = dummy@dummy.invalid
sender = Atomstrom <dummy@dummy.invalid>
receiver = dummy@dummy.invalid
prefix_single = [as]
prefix_digest = [atomstrom]

View File

@ -162,9 +162,8 @@ def mail_daily_digest(session, sender, receiver, prefix):
count = count + 1
body = body + '=> %s - %s\n' % (entry.updated.strftime('%y%m%d-%H%M'), feedinfo.title)
body = body + ' %s\n' % entry.title
body = body + get_entry_text(entry)[0:100]
body = body + '\n'
body = body + 'link: [%s]\n\n' % entry.link
body = body + '%s\n' % get_entry_text(entry)[0:100]
body = body + '%s\n\n' % entry.link
today = datetime.now()
subject = '%s (%s) - %d entries' % (today.strftime('%y%m%d'), today.strftime('%A'), count)
if prefix != '':
@ -175,10 +174,9 @@ def mail_single_entry(feed, feedinfo, entry, sender, receiver, prefix):
subject = '%s' % (entry.title)
if prefix != '':
subject = '%s %s' % (prefix, subject)
body = get_entry_text(entry)
body = body + '\n\n'
body = body + 'site: [%s]\n' % feedinfo.link
body = body + 'link: [%s]\n' % entry.link
body = '%s\n\n' % get_entry_text(entry)
body = body + '%s\n' % feedinfo.link
body = body + '%s\n' % entry.link
send_mail(sender, receiver, subject, body)
def mail_single_entries(session, sender, receiver, prefix):