Code to send email via gmail account

Empleador
no avatar
subiektywnedodatki
Descripción

I need a simple, proven vb.net code to send messages via SMTP through a gmail account.

I've tried various sample codes and settings suggested by uncle gugel, but perhaps the problem also lies in the configuration on the account itself. A doc like

Dim SmtpServer As New SmtpClient("smtp.gmail.com", 465)

SmtpServer.EnableSsl = True

SmtpServer.Credentials = New Net.NetworkCredential("[email protected]", "password")

Dim mail As New MailMessage("[email protected]", "[email protected]", "Test", "Test Body")

SmtpServer.Send(mail)

connected to test account + information on what to change in Gmail account settings to make it work properly.

I need it yesterday because I have enough of my own tests :-)

Publicado
el 2022-01-16
Habilidades

Ofertas enviadas (1)

Presupuesto
Negociable
Derechos de autor
-
Válido por
30 días