Jump to content

Enviar mail em Windows 7


renafi
 Share

Recommended Posts

Boas. Eu tenho uma aplicação para enviar um mail através da minha conta de gmail.

Tenho o seguinte código:

   Dim cliente As New System.Net.Mail.SmtpClient("smtp.gmail.com", 587)         
   cliente.Credentials = New System.Net.NetworkCredential("mail@gmail.com", "pass")
   cliente.EnableSsl = True
   cliente.Send("mail@gmail.com", "teste@gmail.com", "assunto","Corpo")

Mas dá erro no envio a dizer que não consegue contactar o servidor de smtp. Será que é alguma coisa do windows 7 a bloquear? (Dá desliguei firewall e antivirus 😉 )

Oracle Certified Professional - AdministraçãoOracle Certified Professional - Pl/sqlMCPD - Microsoft Certified Professional DeveloperMCTS - Microsoft Certified Technology Specialist

Link to comment
Share on other sites

Já exprimentaste com outros servidores de correio, só para rastreio?

O código está correcto. Porta certinha e tudo.

O que te leva a concluír que poderá ser o sistema operativo? Exprimentaste no Vista por exemplo?

Sérgio Ribeiro


"Great coders aren't born. They're compiled and released"
"Expert coders do not need a keyboard. They just throw magnets at the RAM chips"

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.