473,386 Members | 1,654 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 <vi****@someaddress.biz>'
from email.utils import parseaddr
parseaddr(e)
('', 'K')

Thanks and Regards,
Roopesh
Jun 27 '08 #1
1 1680
En Fri, 09 May 2008 02:55:46 -0300, Roopesh <ro*********@gmail.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 <vi****@someaddress.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

Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: dont bother | last post by:
Hey, I have been trying to parse emails: But I could not find any examples or snippets of parsing emails in python from the documentation. Google did not help me much too. I am trying to...
2
by: Samuel | last post by:
Hello, I am trying to convert a local time into UTC ISO8601, then parse it back into local time. I tried the following: ---------------------- #!/usr/bin/python import time import datetime...
0
by: Mark Sapiro | last post by:
email.Utils.parseaddr('Real Name ((comment)) <address@example.com>') returns ('comment <address@example.com>', 'Real') Granted the string above is invalid as RFC 2822 does not allow...
4
by: Russell Bungay | last post by:
Hello all, I have written a short function, based on a recipe in the Python Cookbook, that sends an e-mail. The function takes arguments that define who the e-mail is to, from, the subject, the...
9
by: Ernesto | last post by:
Is there a special module for mail ? I'd like to send an email from a python script. Thanks !
1
by: fuzzylollipop | last post by:
I want to do email address format validations, without turning to ANTLR or pyparsing, anyone know of a regex that is COMPLIANT with RFC 821. Most of the ones I have found from google searches are...
4
by: Christoph Haas | last post by:
Hello, everyone... I'm trying to send an email to people with non-ASCII characters in their names. A recpient's address may look like: "Jörg Nørgens" <joerg@nowhere> My example code: ...
0
by: Nico Grubert | last post by:
Hi there, I wrote a short python script that sends an email using python's email module and I am using Python 2.3.5. The problem is, that umlauts are not displayed properly in some email...
2
by: anu b | last post by:
Now i am sending email to my friend using session variable... but my code is as below private bool SendEmail(string email) { try
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.