|
-
Sep 8th, 2022, 02:27 AM
#1
Thread Starter
Member
Send email using gmail smtp server
Since Google stopped supporting third-party software which ask you to sign in to your Google Account using only your username and password (on May 30 2022) none of my programs that send email notifications work anymore. Is there a way to make my programs more secure to comply with Gmail's new requirements?
I am simply using System.Net.Mail
VB.NET 2010
Thanks,
Jim
Code:
Sub SendeMail(ByVal MailMSG As String)
Dim SmtpServer As New SmtpClient()
Dim mail As New MailMessage()
SmtpServer.EnableSsl = True
SmtpServer.Credentials = New Net.NetworkCredential(MailFrom, MailPassword)
SmtpServer.Port = MailPort
SmtpServer.Host = MailServer
mail = New MailMessage()
mail.From = New MailAddress(MailFrom)
mail.To.Add(MailTo)
mail.Subject = "NEW IP"
mail.Body = MailMSG
SmtpServer.Send(mail)
End Sub
-
Sep 8th, 2022, 06:12 AM
#2
Addicted Member
Re: Send email using gmail smtp server
 Originally Posted by JimAvanti
Since Google stopped supporting third-party software which ask you to sign in to your Google Account using only your username and password (on May 30 2022)
Not really, Google stopped you from using your user/pass directly, but gives you the ability to use the so-called App Passwords
Go to Google account > Security > Signing in to Google > App passwords
Select your app (in your case select Other custom name) and Generate a password.
This password is the one that you should use in your code (Not your real account password)
Hope that helps
-
Sep 8th, 2022, 10:08 AM
#3
Thread Starter
Member
Re: Send email using gmail smtp server
Thanks for the quick reply cPubis. I must be missing something. My google account doesn't seem to have an App password option. I do have two Apps that are using my Google account though (Amazon Alexa and my cell phone).

 Originally Posted by cPubis
Not really, Google stopped you from using your user/pass directly, but gives you the ability to use the so-called App Passwords
Go to Google account > Security > Signing in to Google > App passwords
Select your app (in your case select Other custom name) and Generate a password.
This password is the one that you should use in your code (Not your real account password)
Hope that helps
-
Sep 8th, 2022, 10:23 AM
#4
Addicted Member
Re: Send email using gmail smtp server
 Originally Posted by JimAvanti
Thanks for the quick reply cPubis. I must be missing something. My google account doesn't seem to have an App password option. I do have two Apps that are using my Google account though (Amazon Alexa and my cell phone).

App Passwords can only be used with accounts that have 2-Step Verification turned on.
As I can see from the image you posted, you have 2-Step Verification turned off!
-
Sep 8th, 2022, 10:42 AM
#5
Thread Starter
Member
Re: Send email using gmail smtp server
Ah! I was hoping not to have to turn 2-step verification on. I suppose I am looking for a way to send an e-mail notification in a more secure way (Like the Alexa and Samsung does) that will satisfy Google's security, or if anyone can suggest a free SMTP server that I could use instead of Google or Yahoo. If not, then I guess I have no other choice but to turn on 2-Step verification.
Thanks,
Jim
 Originally Posted by cPubis
App Passwords can only be used with accounts that have 2-Step Verification turned on.
As I can see from the image you posted, you have 2-Step Verification turned off!
-
Sep 8th, 2022, 10:48 AM
#6
Re: Send email using gmail smtp server
You should be using 2-step verification everywhere you can anyway.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|