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,Yahooma il and Rediffmail provider. - TcpClient tClient = new TcpClient("gmail-smtp-in.l.google.com", 25);
-
-
string CRLF = "\r\n";
-
byte[] dataBuffer;
-
string ResponseString;
-
NetworkStream netStream = tClient.GetStream();
-
StreamReader reader = new StreamReader(netStream);
-
ResponseString = reader.ReadLine();
-
/* Perform HELO to SMTP Server and get Response */
-
dataBuffer = BytesFromString("HELO KirtanHere" + CRLF);
-
netStream.Write(dataBuffer, 0, dataBuffer.Length);
-
ResponseString = reader.ReadLine();
-
dataBuffer = BytesFromString("MAIL FROM:<YourGmailIDHere@gmail.com>" + CRLF);
-
netStream.Write(dataBuffer, 0, dataBuffer.Length);
-
ResponseString = reader.ReadLine();
-
/* Read Response of the RCPT TO Message to know from google if it exist or not */
-
dataBuffer = BytesFromString("RCPT TO:<"+TextBox1.Text.Trim()+">"+CRLF);
-
netStream.Write(dataBuffer, 0, dataBuffer.Length);
-
ResponseString = reader.ReadLine();
-
if (GetResponseCode(ResponseString) == 550)
-
{
-
Label1.Visible = true;
-
Label1.Text = "Mai Address Does not Exist !";
-
Label1.Text = "<font color='red'>Original Error from Smtp Server :</font>" + ResponseString;
-
//Response.Write("Mai Address Does not Exist !<br/><br/>");
-
//Response.Write("<B><font color='red'>Original Error from Smtp Server :</font></b>" + ResponseString);
-
}
-
else
-
{
-
Label1.Visible = true;
-
Label1.Text = "exist";
-
//Response.Write("valid address");
-
}
-
/* QUITE CONNECTION */
-
dataBuffer = BytesFromString("QUITE" + CRLF);
-
netStream.Write(dataBuffer, 0, dataBuffer.Length);
-
tClient.Close();
-
}
-
private byte[] BytesFromString(string str)
-
{
-
return Encoding.ASCII.GetBytes(str);
-
}
-
private int GetResponseCode(string ResponseString)
-
{
-
return int.Parse(ResponseString.Substring(0, 3));
-
}
0 1326 Sign in to post your reply or Sign up for a free account.
Similar topics |
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 I'm adding a customer. The Customer fields are mostly foreign
keys that refer to primary keys in other tables, left join instead of
junction tables at this point. So, when I want to add a customer
record, I also need to add records to the other...
|
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 able to compare the data on a BeforeUpdate event to be
sure that this data is not duplicated.
Here is the structure:
Products 8-1 Frames
|
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
|
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 invoke at first?
It is clear if I write my own client, but I am confused about other clients
which I do not have source codes, for example, if I use Microsoft Excel (as a
client) to invoke my C# OLE DB Provider, which is the entry point? Any
|
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", "orcl");
if ( ! $c ) {
echo "Unable to connect: " . var_dump( OCIError() );
| |
by: xraive |
last post by:
I have two tables
Table1(TripEventTypes)
TripEventyTypeID
EventTypeID
Table2(TripEventTypeDetails)
TripEventTypeID
EventTypeDetailID
EventTypeDetailValue
I am trying to insert multiple records into table 2 from a form. Is there a way to do this? example would be a form for a Flight event
|
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 just a single variant in the software field.
I want to know if it is possible to have my form setup in such a way that it takes one instance of constant data and various instances of a variant field but for each variant create a new record and add...
|
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 prior record and drops to this field once data is filled in main form. So, if I tab across the main form and expect the first field of the subform to follow, I am disappointed. Cannot figure out how to ensure that after saving a record the tabbing...
|
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;
double studentscore;
double score1, score2, score3, score4;
int i, z;
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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...
| |
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...
|
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...
|
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...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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...
| | |