equal
deleted
inserted
replaced
82 name |
82 name |
83 """ |
83 """ |
84 assert type(content) is unicode, repr(content) |
84 assert type(content) is unicode, repr(content) |
85 msg = MIMEText(content.encode('UTF-8'), 'plain', 'UTF-8') |
85 msg = MIMEText(content.encode('UTF-8'), 'plain', 'UTF-8') |
86 # safety: keep only the first newline |
86 # safety: keep only the first newline |
87 subject = subject.splitlines()[0] |
87 try: |
88 msg['Subject'] = header(subject) |
88 subject = subject.splitlines()[0] |
|
89 msg['Subject'] = header(subject) |
|
90 except IndexError: |
|
91 pass # no subject |
89 if uinfo.get('email'): |
92 if uinfo.get('email'): |
90 email = uinfo['email'] |
93 email = uinfo['email'] |
91 elif config and config['sender-addr']: |
94 elif config and config['sender-addr']: |
92 email = unicode(config['sender-addr']) |
95 email = unicode(config['sender-addr']) |
93 else: |
96 else: |