mail.py
changeset 5590 a56eb02f9ce7
parent 5556 9ab2b4c74baf
parent 5579 297b2002a083
child 5736 375819ec7d43
equal deleted inserted replaced
5578:6b9fee0c5c42 5590:a56eb02f9ce7
    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: