Bug in email.utils, parseaddr

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Roopesh

    Bug in email.utils, parseaddr

    Hi,

    I tried using parseaddr of email.utils, but it gave the following
    result when the name had a comma inside.
    >>e = 'K,Vishal <vishal@someadd ress.biz>'
    >>from email.utils import parseaddr
    >>parseaddr(e )
    ('', 'K')

    Thanks and Regards,
    Roopesh
  • Gabriel Genellina

    #2
    Re: Bug in email.utils, parseaddr

    En Fri, 09 May 2008 02:55:46 -0300, Roopesh <roopesh.raj@gm ail.com>
    escribió:
    I tried using parseaddr of email.utils, but it gave the following
    result when the name had a comma inside.
    >
    >>>e = 'K,Vishal <vishal@someadd ress.biz>'
    >>>from email.utils import parseaddr
    >>>parseaddr( e)
    ('', 'K')
    That's an invalid address. A comma "," is a special character and it
    cannot happen inside an atom, it must be quoted. See section 3.4 in
    RFC2822 <http://www.faqs.org/rfcs/rfc2822.html>

    --
    Gabriel Genellina

    Comment

    Working...