15,918,706 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Rao Lokesh (Top 15 by date)
Rao Lokesh
23-May-14 3:12am
View
On Selected Index Change Event Get The Value of Combo Box And If It is The desired one Then Do Whetever you want to do in if condition
Rao Lokesh
23-May-14 3:11am
View
Cant Read Your Mind
Rao Lokesh
23-May-14 2:05am
View
C:\Users Give Path Like This Your Path Is Wrong
\192.168.2.125\C:\
Rao Lokesh
23-May-14 2:04am
View
just write the complete path in your browser and see if it opens the file ,then past the complete path in your path
Rao Lokesh
23-May-14 1:51am
View
Application.startuppath file find the server path from where build is running and then just add the folder and file name .......u can test this method process.start to check whether the file is really accessible
Rao Lokesh
23-May-14 1:48am
View
http://stackoverflow.com/questions/866239/creating-the-checkbox-dynamically-using-javascript
Rao Lokesh
23-May-14 1:44am
View
Process.Start(Application.StartupPath & "Excel.xls")
Write you image path in place of Excel and check
Rao Lokesh
23-May-14 1:42am
View
Have you tried Application.StartupPath
Rao Lokesh
23-May-14 1:16am
View
http://verify-email.org/
Check 3nikhilsagar77@yahoo.com at this web site
Rao Lokesh
22-May-14 8:48am
View
Yes I m 100 % sure this email is not valid . emails get bounced if i send to this email , that is the thing my tool is also showing it verified but in reality it is not . some of the tool on internet tell correctly that it is a invalid email
Rao Lokesh
22-May-14 1:23am
View
MY Complete Code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Mail;
using System.Net.Sockets;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Heijden.DNS;
using System.IO;
using System.Data;
using System.Data.SqlClient;
namespace EmailValidation_Library
{
public enum ValidationMode
{
Syntax,
Network
};
public class EmailValidator : IDisposable
{
public string MailFrom { get; set; }
public string GetLastError { private set; get; }
public string ValidateEmail(string strInputEmail)
{
//string strAcceptableEmailAddressPattern = @"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}" +
// @"\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\" +
// @".)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$";
//Regex regPatternEmail = new Regex(strAcceptableEmailAddressPattern);
//case ValidationMode.Syntax:
// try
// {
// return (regPatternEmail.IsMatch(strInputEmail));
// }
// catch (Exception RegExPatternException)
// {
// GetLastError = string.Format("Could not match pattern because of the error {0} ",RegExPatternException.Message);
// return (false);
// }
//case ValidationMode.Network:
string strHostName = string.Empty;
try
{
string[] arrHost = strInputEmail.Split('@');
strHostName = arrHost[1];
}
catch (Exception HostMalformedException)
{
GetLastError = string.Format("Could not identify the target email server because of the error {0} ", HostMalformedException.Message);
}
try
{
Resolver objResolver = new Resolver();
Response objResponse = objResolver.Query(strHostName, QType.MX, QClass.IN);
bool blnValidAddress = false;
if (objResponse.RecordsMX.Length < 1)
{
return ("Host Name Not Found ");
}
else
{
foreach (RecordMX recMx in objResponse.RecordsMX)
{
//blnValidAddress = VerifySmtpResponse(recMx.EXCHANGE, strInputEmail);
//if (blnValidAddress)
// break;
//TcpClient tClient = new TcpClient(recMx.EXCHANGE, 25);
TcpClient tClient = new TcpClient(recMx.EXCHANGE, 995);
//TcpClient tClient = new TcpClient( );
//tClient.Connect("www.yahoo.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 Here" + CRLF);
netStream.Write(dataBuffer, 0, dataBuffer.Length);
ResponseString = reader.ReadLine();
string str = strInputEmail;
dataBuffer = BytesFromString("MAIL FROM:<" + str + ">" + 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:<" + strInputEmail.Trim() + ">" + CRLF);
Rao Lokesh
22-May-14 1:21am
View
"VRFY" AND EXPN is also not working ,
Problem is they are giving 250 OK response. But in reality that email doesn't exist
For Example "3nikhilsagar77@yahoo.com" It Is Not a valid email but 250 response come when I check
Rao Lokesh
21-May-14 3:01am
View
I Have To check whether an email really exists or not. my code is running fine for all other mail clients except yahoo.
I read response code from reader if code is 250 then email is verified but in case of yahoo ,it always give 250 code
Rao Lokesh
31-Mar-14 2:25am
View
Mark As Answer If You Get Answer
Rao Lokesh
31-Mar-14 2:20am
View
double a = 2.333333;
System.Math.Round(a)
After This U Can Convert It Into Format You Want
Show More