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