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

About the MX Record Entry of particular hotmail,yahoomail and rediffmail provider

I am designing one web page which checks the existence of the Email Address on the server

For that I have the following code.....this code checks the the existence of gmail address for

e.g xxxx@gmail.com on the Gmail server

so can anyone please tell me what is the MX Record Entry of Hotmail,Yahoomail and Rediffmail provider.

Expand|Select|Wrap|Line Numbers
  1. TcpClient tClient = new TcpClient("gmail-smtp-in.l.google.com", 25);
  2.  
  3.      string CRLF = "\r\n";
  4.      byte[] dataBuffer;
  5.      string ResponseString;
  6.     NetworkStream netStream = tClient.GetStream();
  7.      StreamReader reader = new StreamReader(netStream);
  8.     ResponseString = reader.ReadLine();
  9.     /* Perform HELO to SMTP Server and get Response */
  10.      dataBuffer = BytesFromString("HELO KirtanHere" + CRLF);
  11.      netStream.Write(dataBuffer, 0, dataBuffer.Length);
  12.      ResponseString = reader.ReadLine();
  13.     dataBuffer = BytesFromString("MAIL FROM:<YourGmailIDHere@gmail.com>" + CRLF);
  14.      netStream.Write(dataBuffer, 0, dataBuffer.Length);
  15.      ResponseString = reader.ReadLine();
  16.     /* Read Response of the RCPT TO Message to know from google if it exist or not */
  17.      dataBuffer = BytesFromString("RCPT TO:<"+TextBox1.Text.Trim()+">"+CRLF);
  18.      netStream.Write(dataBuffer, 0, dataBuffer.Length);
  19.     ResponseString = reader.ReadLine();
  20.     if (GetResponseCode(ResponseString) == 550)
  21.     {
  22.         Label1.Visible = true;
  23.         Label1.Text = "Mai Address Does not Exist !";
  24.         Label1.Text = "<font color='red'>Original Error from Smtp Server :</font>" + ResponseString;
  25.         //Response.Write("Mai Address Does not Exist !<br/><br/>");
  26.         //Response.Write("<B><font color='red'>Original Error from Smtp Server :</font></b>" + ResponseString);
  27.     }
  28.     else
  29.     {
  30.         Label1.Visible = true;
  31.         Label1.Text = "exist";
  32.         //Response.Write("valid address");
  33.     }
  34.     /* QUITE CONNECTION */
  35.      dataBuffer = BytesFromString("QUITE" + CRLF);
  36.      netStream.Write(dataBuffer, 0, dataBuffer.Length);
  37.      tClient.Close();
  38.  }
  39.  private byte[] BytesFromString(string str)
  40.  {
  41.      return Encoding.ASCII.GetBytes(str);
  42.  }
  43. private int GetResponseCode(string ResponseString)
  44.  {
  45.      return int.Parse(ResponseString.Substring(0, 3));
  46.  }
Mar 6 '14 #1
0 1307

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

Similar topics

5
by: Ross A. Finlayson | last post by:
Hi, I'm scratching together an Access database. The development box is Office 95, the deployment box Office 2003. So anyways I am griping about forms and global variables. Say for example...
1
by: pcnorb | last post by:
I have a form, pulling data from a Products table that has many fields that do lookups to other tables. These are in a one-to-many relationship to a pk in each of said tables. I'd like to be...
1
by: ryano | last post by:
Can anyone tell me where to get the code for inserting a record into an access database? I can't find a simple internet site to do this. Thanks in advance, Sean
2
by: =?Utf-8?B?R2Vvcmdl?= | last post by:
Hello everyone, I am implementing a simple C# OLE DB Provider (C# COM Server). For C# (managed code), I am wondering what is the entry point (which coclass and which method), client will...
6
by: teser3 | last post by:
I have my PHP inserting into Oracle 9i. But how do I prevent duplicate record entries? I only have 3 fields in the insert in the action page: CODE <?php $c=OCILogon("scott", "tiger",...
6
by: xraive | last post by:
I have two tables Table1(TripEventTypes) TripEventyTypeID EventTypeID Table2(TripEventTypeDetails) TripEventTypeID EventTypeDetailID EventTypeDetailValue I am trying to insert multiple...
5
by: KingKen | last post by:
I have a situation whereby I have to enter many records in a db that only have one field that changes. For example software installed on a computer would give you many different rows of data with...
2
by: cambar | last post by:
When Access db is first opened and the first record is entered, tabbing on subform works properly. However, when subsequent records are entered, the subform retains memory of the last field filled in...
1
by: dttin27 | last post by:
I have to create a 2 dimensional array (5X4 (int type)) which can hold 4 exam scores for each of 5 students.Here is my code: #include<stdio.h> int main(void) { int numstu = 5; ...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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,...

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.