Skip Navigation Links
Novas Tecnologias
Ferramentas Adicionais
Ferramentas Adicionais


Dica No :
619
Assunto : .NET
Titulo: Verificando se o domínio de um e-mail existe

Gostou do texto ? Vote e dê sua opinião! Pontuação atual :

Translate this page now :






Adicione aos Favoritos!
BlogBlogs Rec6 Linkk Ueba Technorati Delicious DiggIt! StumbleUpon



Uma boa forma de evitar cadastramentos com e-mail falso é verificar se o domínio de um determinado endereço de e-mail realmente existe.

Para fazer isso devemos realizar a resolução do nome DNS do servidor de domínio. Se encontrarmos como resposta um endereço IP, o domínio existe, se tivermos um erro como resposta então o servidor de domínio certamente não é válido.

No ASP.NET pode-se, por exemplo, usar um CustomValidator para realizar a validação de endereços de correio. Veja como fica o código de validação :

Dim dominio As String
Dim obj As Net.IPHostEntry
dominio = TextBox1.Text.Substring(TextBox1.Text.IndexOf("@") + 1)
Try
obj = Net.Dns.Resolve(dominio)
Label1.Text = obj.AddressList(0).ToString
Catch er As Exception
args.isvalid = False
'ou, para aplicações windows
'msgbox("Domínio inválido!")
End Try

Como podem notar, tarefas que antes eram muito dificeis de serem realizadas, tal como uma resolução DNS via código, com o Framework .NET se tornaram muito simples.


Nome :
E-mail:
Comentarios :
 
 
Os Últimos Comentários
data: 7/23/2017 8:34:00 PM
nome: lacoste outlet
email: xtkkqwhox@gmail.com
comentário:
I have to express appreciation to this writer for bailing me out of such a issue. As a result of looking out throughout the world wide web and obtaining recommendations that were not pleasant, I thought my entire life was gone. Existing minus the strategies to the difficulties you've fixed as a result of this website is a crucial case, and the kind that might have negatively affected my entire career if I hadn't come across your website. Your personal know-how and kindness in maneuvering all the details was important. I am not sure what I would've done if I hadn't come upon such a solution like this. I'm able to now relish my future. Thanks for your time so much for the skilled and amazing guide. I won't be reluctant to refer the website to any person who requires tips about this problem.

data: 7/21/2017 6:58:00 AM
nome: cheap jordans
email: ufucjwi@gmail.com
comentário:
I have to express my admiration for your generosity for those individuals that have the need for assistance with that topic. Your personal commitment to getting the solution all around had become incredibly important and has continuously permitted somebody like me to arrive at their dreams. The valuable guidelines entails much a person like me and even further to my mates. Thanks a lot; from each one of us.

data: 7/19/2017 12:51:00 PM
nome: adidas yeezy boost
email: haobeq@gmail.com
comentário:
I just wanted to send a quick message so as to thank you for all of the magnificent points you are showing at this site. My time intensive internet research has at the end of the day been honored with reliable ideas to share with my friends. I would suppose that we visitors are truly lucky to live in a decent network with so many outstanding professionals with useful methods. I feel truly grateful to have discovered your entire website and look forward to some more excellent moments reading here. Thank you once more for a lot of things.

data: 7/18/2017 7:56:00 AM
nome: Adidas NMD Women Mesh Surface Black Sky Blue
email: wfydpl@gmail.com
comentário:
Youre so cool! I dont suppose Ive learn anything like this before. So nice to find any person with some unique ideas on this subject. realy thanks for beginning this up. this website is something that's needed on the net, someone with just a little originality. helpful job for bringing one thing new to the web!

data: 7/16/2017 11:13:00 PM
nome: vibram fivefingers
email: yegxolafpk@gmail.com
comentário:
I wish to show appreciation to you for bailing me out of this type of incident. As a result of searching through the the web and finding thoughts that were not pleasant, I was thinking my entire life was done. Living without the presence of answers to the issues you have sorted out by way of your good posting is a critical case, as well as the kind that could have in a wrong way damaged my career if I hadn't encountered your web blog. Your primary ability and kindness in playing with the whole lot was helpful. I don't know what I would've done if I had not come across such a step like this. I can also at this point relish my future. Thanks for your time so much for this professional and results-oriented guide. I will not hesitate to propose the sites to any person who needs and wants care on this area.

 1  
Dicas
Dica do Dia
Receba Dicas Por Email
E-mail :  
 


 (help)
Aceito receber informativos do devASPNet, informações de eventos e treinamentos

Veja Quais Informativos Você Receberá

Pesquisar Dicas
Pesquisar Artigos, Dicas e Noticias

Banco de Dados
Algumas Entrevistas
Links Importantes

Búfalo Informática, Treinamento e Consultoria
R. Alvaro Alvim, 37/920 Centro - Cinelândia - Rio de Janeiro Cep: 20031-010
Tel : (21) 2262-1368 (21) 9240-5134 E-mail : Contato@bufaloinfo.com.br