Click here to Skip to main content
11,570,741 members (55,622 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
plz help me to validate email address in domain ...
for example i want to check the email address like xyz@yahoo.com exists or not...
for gmail,rediff,hotmail etc etc....
Posted 10-Dec-12 5:47am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

The best way to check this, is to send a confirmation email within a code. You ask the user to enter the code in a text box and then you can check whether the sent code is equal to the entered code.
To send an email:
Sending an Email in C# with or without attachments: generic routine.[^]
VB.NET tip:
Sending an Email in C# with or without attachments: generic routine.[^]
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Hi,

Try this

<asp:regularexpressionvalidator id="regexEmailValid" runat="server" validationexpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" controltovalidate="tbEmail" errormessage="Invalid Email Format" xmlns:asp="#unknown">
  Permalink  
Comments
ProgramFOX at 10-Dec-12 12:38pm
   
This isn't what the OP asks. The OP asks how to check whether an email address does exist.
Your answer checks whether the entered email address is in a valid format.
ashokmmrk at 10-Dec-12 13:02pm
   
Please, Once Again read this

for example i want to check the email address like xyz@yahoo.com exists or not...

He clearly mention that Email address like xyz@yahoo.com exists or not...
Zaf Khan at 10-Dec-12 23:10pm
   
I agree with ProgramFox, The best way to see if an email EXISTS is to send an email to to the address - taking for granted that the FORMAT of the email address is correct.

The best way to VALIDATE if an email is FORMATTED correct is probably the way ashokmmrk says.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


Advertise | Privacy | Mobile
Web04 | 2.8.150624.2 | Last Updated 19 Mar 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100