fixed encoding of digest-mails
This commit is contained in:
		
							
								
								
									
										14
									
								
								atomstrom.py
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								atomstrom.py
									
									
									
									
									
								
							@@ -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)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user