fixed encoding of digest-mails

This commit is contained in:
Ronald Schaten 2013-03-21 21:42:28 +01:00
parent f53338c3b1
commit 1f4a69de18

View File

@ -182,10 +182,16 @@ def mail_daily_digest(session, sender, receiver, prefix):
link = entry.link link = entry.link
if entry.resolvedlink: if entry.resolvedlink:
link = entry.resolvedlink link = entry.resolvedlink
body = body + '=> %s - %s\n' % (entry.firstfetched.strftime('%y%m%d-%H%M'), feedinfo.title) try:
body = body + ' %s\n' % entry.title body = body + '=> %s - %s\n' % (entry.firstfetched.strftime('%y%m%d-%H%M'), feedinfo.title)
body = body + '%s\n' % get_entry_text(entry)[0:100] body = body + ' %s\n' % entry.title.decode('latin-1')
body = body + '%s\n\n' % link body = body + '%s\n' % get_entry_text(entry)[0:100]
body = body + '%s\n\n' % link
except:
print 'ERROR processing entry %s' % entry.id;
print sys.exc_info()
print 'not sending mail'
return
if count > 0: if count > 0:
today = datetime.now() today = datetime.now()
subject = '%s (%s) - %d entries' % (today.strftime('%y%m%d'), today.strftime('%A'), count) subject = '%s (%s) - %d entries' % (today.strftime('%y%m%d'), today.strftime('%A'), count)