reformatted mail
This commit is contained in:
parent
724ab03563
commit
bc1b0655e0
@ -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]
|
||||
|
12
atomstrom.py
12
atomstrom.py
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user