473,507 Members | 2,460 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to determine if a string is an EMail account

ad
Hi,
As title,

How to determine if a string is an EMail account?
Nov 17 '05 #1
7 4453
"ad" <fl****@wfes.tcc.edu.tw> wrote in message
news:Ov**************@TK2MSFTNGP09.phx.gbl...
How to determine if a string is an EMail account?


Do you mean how to verify that a string is in a valid email address format,
or that the email address actually exists...?

The former is very easy - that latter is very difficult...
Nov 17 '05 #2

Mark Rae wrote:
"ad" <fl****@wfes.tcc.edu.tw> wrote in message
news:Ov**************@TK2MSFTNGP09.phx.gbl...
How to determine if a string is an EMail account?


Do you mean how to verify that a string is in a valid email address format,
or that the email address actually exists...?

The former is very easy - that latter is very difficult...


Well, not really. Send an email to the address and see if you get a
bounced message back. Yes, I know, its not exactly what people had in
mind.

Still, format is fairly easy. so*******@something.something, where the
somethings all have letters, numbers, underscores, or dashes.
matt

Nov 17 '05 #3
You mean the format? If yes, you can use regular expressions. Check out
www.regexlib.com for various expressions to test email addresses.

"ad" <fl****@wfes.tcc.edu.tw> wrote in message
news:Ov**************@TK2MSFTNGP09.phx.gbl...
Hi,
As title,

How to determine if a string is an EMail account?

Nov 17 '05 #4
On 19 Oct 2005 08:32:33 -0700, "Matt" <ma********@sprynet.com> wrote:
Still, format is fairly easy. so*******@something.something, where the
somethings all have letters, numbers, underscores, or dashes.


The following are correct email addresses that the above will fail to
validate:

us**@example.co.uk
fi****************@example.com
us*********@example.com
user@localhost

There must be a thousand incorrect email validator implementations for
each correct one. Writing a correct email format validator is far more
difficult than most people think. There is a reason that the regex to
parse rfc822 is as large as it is.

--
Marcus Andrén
Nov 17 '05 #5

Marcus Andrén wrote:
On 19 Oct 2005 08:32:33 -0700, "Matt" <ma********@sprynet.com> wrote:
Still, format is fairly easy. so*******@something.something, where the
somethings all have letters, numbers, underscores, or dashes.

The following are correct email addresses that the above will fail to
validate:

us**@example.co.uk
fi****************@example.com
us*********@example.com
user@localhost

There must be a thousand incorrect email validator implementations for
each correct one. Writing a correct email format validator is far more
difficult than most people think. There is a reason that the regex to
parse rfc822 is as large as it is.


The question was really just recognizing one. If all of the characters
are valid, and it only has one @ sign (you are correct, though, I left
off the period) its a potentially valid email address. I'm assuming
that he wanted to format them differently. Checking to see if a given
address really exists is a whole different matter, as most have pointed
out. You could do a quick check to see if the domain was valid via DNS
lookup, and then validate the user-name according to the rules, I
suppose.

Matt

--
Marcus Andrén


Nov 17 '05 #6
"Matt" <ma********@sprynet.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
Still, format is fairly easy. so*******@something.something, where the
somethings all have letters, numbers, underscores, or dashes.


Er, I think there's just a tad more to it than that...
Nov 17 '05 #7
"Marcus Andrén" <a@b.c> wrote in message
news:mv********************************@4ax.com...
There must be a thousand incorrect email validator implementations for
each correct one. Writing a correct email format validator is far more
difficult than most people think. There is a reason that the regex to
parse rfc822 is as large as it is.


Correct.

http://www.codeproject.com/csharp/rfc822validator.asp
Nov 17 '05 #8

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

Similar topics

1
3901
by: Sam | last post by:
Hi, I integrated the following programs in freebsd 5.4. phpldapadmin openldap 2.2_26 courier-imap courier-authlib courier-authdaemon cyrus-sasl2-saslauthd postfix
0
1878
by: baso | last post by:
hello! i want to change the email-account-settings (postofficeoutputserver from the current windows-user, who is currently logged in. until yet i have tried the following possible beginnings:...
1
1960
by: kerpal | last post by:
Hi all, I need to retrieve some information (POP/SMTP server names, etc.) of a current POP3 login email account in Outlook 2002/2003. How may i go about achieving this? Any suggestion would...
0
876
by: ywchan | last post by:
Given an email address, I would like to get its alias and some other information corresponding to the email account that set in the exchange server. How can I do it? Thanks!
1
1114
by: empit4ever | last post by:
Hi All, This is my requirement. Our outlook address book is our corporate hierarchy note. In the sense, if I look into my email account properties I can see my boss's email adress and so on.. ...
0
943
by: ibrettferguson | last post by:
I'm trying to figure out how I can grab the logged in user's network Id (easy enough) to pass to a remotely hosted Exchange server, and have that server return the users actual email account. ...
6
2616
by: atcohaz | last post by:
Hi everybody, I have a personal server (I learning) with Linux with using Cpanel I only need such script which enables me to create email accounts without logging into cPanel. And in which I...
2
2147
by: JAB | last post by:
Hi, I have MS Exchange 2003 server on the same server i have host my website. I need a web page that people who interested to have theri own email account. I need an ASP .net web page to...
4
2507
controlbox
by: controlbox | last post by:
Does anyone know a way to programatically determine the Windows Account IIS is using from inside an ASP or ASP.Net page?
0
7223
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
7110
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
7314
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
7372
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
7482
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...
0
5623
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5041
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
411
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.