473,666 Members | 2,102 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to check whether email id exists?

Maidenz08
31 New Member
How do i check whether an email id exists or not?

I am following a three step validation process..

1) syntax validation- which is pretty straight forward

2) DNS validation - I'm able to do this too.

3) mailbox validation - I have read in many forums saying it is IMPOSSIBLE to check whether a particular email id exists. But take a look at this site.

http://www.dimplesoftwares.com/email...rlivedemo.aspx

When they can do it there has to be some way. I have searched every nook and corner but to no avail.. Any help would be greatly apppreciated.


Here's is wat im doing
Expand|Select|Wrap|Line Numbers
  1.  public void ValidateMailBox(string emailAddress)
  2.         {
  3.             string[] id = emailAddress.Split('@');
  4.             string host = id[0];
  5.  
  6.  
  7.             if (!CheckSmtpServerResponse(sock, SmtpServerResponse.CONNECT_SUCCESS))
  8.             {
  9.                 sock.Close();
  10.                 bConnectStatus = false;
  11.             }
  12.             else
  13.             {
  14.                 bConnectStatus = true;
  15.             }
  16.  
  17.             SendData(string.Format("HELO {0}\r\n", Dns.GetHostName()));
  18.             if (!CheckSmtpServerResponse(sock, SmtpServerResponse.GENERIC_SUCCESS))
  19.             {
  20.                 sock.Close();
  21.                 bHelloStatus = false;
  22.             }
  23.             else
  24.             {
  25.                 bHelloStatus = true;
  26.             }
  27.  
  28.             SendData(string.Format("MAIL From: {0}\r\n", "test@yahoo.com")); //_SenderEmail));
  29.             if (!CheckSmtpServerResponse(sock, SmtpServerResponse.GENERIC_SUCCESS))
  30.             {
  31.                 sock.Close();
  32.                 bBlackListStatus = false;
  33.             }
  34.             else
  35.             {
  36.                 bBlackListStatus = true;
  37.             }
  38.  
  39.             SendData(string.Format("RCPT TO: {0}\r\n", "test2@gmail.com"));
  40.             if (!CheckSmtpServerResponse(sock, SmtpServerResponse.GENERIC_SUCCESS))
  41.             {
  42.                 sock.Close();
  43.                 bSendStatus = false;
  44.             }
  45.             else
  46.             {
  47.                 bSendStatus = true;
  48.             }
  49.         }
  50.  
  51.         public void SendData(string message)
  52.         {
  53.             byte[] bytes = System.Text.Encoding.ASCII.GetBytes(message);
  54.             sock.Send(bytes, 0, bytes.Length, SocketFlags.None);
  55.         }
  56.  
  57.         public bool CheckSmtpServerResponse(Socket soc, SmtpServerResponse code)
  58.         {
  59.             string responseString;
  60.             int responseCode;
  61.             byte[] bytes = new byte[1024];
  62.             while (sock.Available == 0)
  63.             {
  64.                 System.Threading.Thread.Sleep(100);
  65.             }
  66.             sock.Receive(bytes, 0, sock.Available, SocketFlags.None);
  67.             responseString = System.Text.Encoding.ASCII.GetString(bytes);
  68.             responseCode = Convert.ToInt32(responseString.Substring(0, 3));
  69.             if (responseCode != (int)code)
  70.             {
  71.                 return false;
  72.             }
  73.             else
  74.             {
  75.                 return true;
  76.             }
  77.             //return responseCode.Equals(Convert.ToInt32(code));
  78.         }
Jan 24 '08 #1
3 14549
radcaesar
759 Recognized Expert Contributor
The URL u specified send and receive some response from that mail-id and then it reports, Since it takes some time for the report. See that LOG.
Jan 24 '08 #2
Plater
7,872 Recognized Expert Expert
SMTP has commands that can be used to verify a given mailbox, unfortunatly since it's not part of the minimal implementation, almost NO smtp server implement it (it can be used to generate directed spam).

What many places do, is send an email to the address, and that email gives directions on verifying that it exists. (Usually a special link with a unique id string to click or something)
Jan 24 '08 #3
kunyunfang
1 New Member
GOOD!
thank you!
I like the article!
Jan 28 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
43025
by: DottingTheNet | last post by:
i promise no more silly questions after this but how do i check if a table exists?? it is my understanding that the exists can only be used in the where clause of the query. i just want s'thing simple like if exists ('test') then ---good else --create it
2
17894
by: adam | last post by:
hello What query shoul I send to SQL serwer ( in transact SQL language ) to check does some database exist on serwer ? It similar to problem "does some table exist in database" - resolve to it is query: use db_silnik IF EXISTS (SELECT * FROM prad) PRINT 'table exist'
2
3436
by: John M | last post by:
Hi, I want to create a link to another database table. I've succeeded in doing this, and avoided creating the the link over and over again by putting in the error statement something to the effect of if it doesn't exist then create it. (did this be finding the error number). Unfortunately I've moved on since then and I only know it doesn't exist when the form using it is opened! I've then gone past me procedure. It would be anyway far...
10
4505
by: Raymond | last post by:
Hi All: To find a file exists using the file name, I have tow routings on UNIX system. 1. access(2) 2. lstat(2) This tow function also can do. When the return value is "-1" and errno is "ENOENT", The file doesn't exist.
7
33466
by: andylcx | last post by:
Hi all: The c++ language can check whether the file exist or not. I am wondering how c language does this job? Thanks a lot! Andy
1
7410
by: Onur Bozkurt | last post by:
Is there anyway to check if an e-mail address exists..... I mean someone entered a mail address in a form... I wan't to check if that e-mail reallly exists, doesn't matter if he/she really owns it. Thanks...
5
11093
by: sword | last post by:
How can I check whether a file exists?
3
11038
by: byeung | last post by:
Hi, I am trying to check if a particular record already exists in an Access database through Excel vba code. Through code obtained at another forum, I got the following: *********************************************************************** Sub TheButton()
12
2230
by: foolsmart2005 | last post by:
There are 10 webpages on the host, e.g. 001.html, 002.html, 003,html, 004.html, ......010.html I want to check whether the page is the last page. How can I do. In the index.html -Go to last page,<---- I want to link this to the last page(010.html). Can I do it? How? Thanks!
0
8360
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8876
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8784
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8556
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8642
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7387
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6198
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4198
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1777
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.