smtplib.quoteaddr()

smtplib.quoteaddr(addr)[source]

Quote a subset of the email addresses defined by RFC 821.

Should be able to handle anything rfc822.parseaddr can handle.