def email_address_header(self): h = header.Header() h.append( '"%s"%s' % (self.get_pref('display_name'), ' ' if six.PY2 else '') ) # py2 needs explicit space for unicode/text_type cast of Header h.append('<%s>' % self.get_pref('email_address')) return h
def email_address_header(self): h = header.Header() h.append('"%s" ' % self.get_pref('display_name')) h.append('<%s>' % self.get_pref('email_address')) return h
def email_address_header(self): h = header.Header() h.append(u'"%s" ' % self.get_pref('display_name')) h.append(u'<%s>' % self.get_pref('email_address')) return h
def email_address_header(self): h = header.Header() h.append(u'"%s" ' % self.get_pref("display_name")) h.append(u"<%s>" % self.get_pref("email_address")) return h