473,403 Members | 2,338 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,403 software developers and data experts.

mail addresses

Suppose I have an email.Message object.
I can extract the sender by using ["From"]. However sometimes I
get addresses in the form

John Doe <jo******@somedomain.com>

sometimes I get addresses in the form

ja******@someotherdomain.org

Is there a standard way to normalize the addresses? It is only the second
form that I am interested in. TIA,

Michele Simionato
Jul 18 '05 #1
1 1265
Michele Simionato wrote:
Suppose I have an email.Message object.
I can extract the sender by using ["From"]. However sometimes I
get addresses in the form

John Doe <jo******@somedomain.com>

sometimes I get addresses in the form

ja******@someotherdomain.org

Is there a standard way to normalize the addresses? It is only the second
form that I am interested in. TIA,


from email.Utils import parseaddr

-Peter
Jul 18 '05 #2

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

Similar topics

5
by: Joe | last post by:
I want to use mail() to send a message to a group of addresses in a mysql table. Išve got my mail script and my sql query, but I donšt know how to format the query results to fit into the mail()...
2
by: AJ | last post by:
Hi all I've written a little newsletter script that takes addresses from a table and sends an e-mail to them. What I don't understand is what happens to wrong addresses. It all works and when...
12
by: Chris Dewin | last post by:
Hi. I've been thinking about using smtplib to run a mailing list from my website. s = smtplib.SMTP("server") s.sendmail(fromaddress, toaddresess, msg) I know that in this instance, the...
3
by: Nathan Sokalski | last post by:
I have an ASP.NET page that sends a Mail.MailMessage to several email addresses (all mine). However, one of the addresses, the one ending in @verizon.net, does not seem to be recieving the message...
1
by: cemcat | last post by:
Hello, We have an ASP.NET 2.0 (C#) web form that contains a textbox for users to enter multiple e-mail addresses separated by semicolons. We need to validate that each individual e-mail address...
6
by: jerrygarciuh | last post by:
Hi folks, HELP!!!! My habitual use of mail() is causing me some grief. I am having slightly different results depending on the server I use but the gist is that mail() is returning 1, and I...
10
by: Newbie | last post by:
Hi all, I'm looking for a way to send newsletter to my subscribers (1000+ in total). I've managed to do it using .NET system.net.mail.smtpclient's sendAsync. I read the email addresses from a...
4
by: NielsM | last post by:
Hello all, I have a table (tblExport03) with the following fields: ID : autonumber Title : text FirstName : text LastName : text OrganisationName : text BusinessEmailAddres : text (isNull,...
10
by: Logipro | last post by:
Hi, Can it's possible to send a local Web page (HTML) (with pictures) by Outlook, OE, MAPI or Jmail, simply by pass a Html path files ? I try many many tips like replace "cid:" before image in...
27
by: cnixuser | last post by:
Hi, I am trying to write an application that will e-mail sales data reports once per day. I have largely succeeded in creating the application and I am able to e-mail my reports to some e-mail...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.