Quantcast
Viewing all articles
Browse latest Browse all 15072

VS 2013 [RESOLVED] Issues sending Gmail/Email

Hi there,

I am writing a simple app and am getting stuck trying to send email. It has worked before easy enough but changing to gmail has caused an issue.

Here is the (simple/rudimentary) code:
Dim SmtpServer As New SmtpClient("smtp.gmail.com", 465)
SmtpServer.EnableSsl = True
SmtpServer.Credentials = New Net.NetworkCredential("email@gmail.com", "password")
Dim mail As New MailMessage("email@gmail.com", "email@gmail.com", "Test", "Test Body")
SmtpServer.Send(mail)

It hangs at .send with the following error:
An unhandled exception of type 'System.Net.Mail.SmtpException' occurred in System.dll Additional information: Failure sending mail.

I attached a snap of the error.

Any ideas as I know my creds are right being as I logged in and out of gmail web app a few times on a few browsers (Google, IE, Edge).

Thank you,

Gary
Attached Images
Image may be NSFW.
Clik here to view.
 

Viewing all articles
Browse latest Browse all 15072

Trending Articles