Ok so google have (I’ve just found out) said they will drop the insecure connection from end of September 2024.
And I use it! You know what it’s like if it ain’t broke don’t fix it.
But I’m being proactive for once as email sending from my apps are crucial for me to know what’s going on.
So question is: old code
’ Connect to Gmail
MailSocket.Address = “smtp.gmail.com”
MailSocket.Port = 465
MailSocket.SSLConnectionType = SSLSocket.SSLConnectionTypes.TLSv1
MailSocket.SMTPConnectionMode = SMTPSecureSocket.SMTPConnectionTypes.SSLTLS
MailSocket.SSLEnabled = True
As far as I understand won’t connect anymore so what else is there to use!?
My code is invisible from the customer (they are aware it sends out emails) and I dont want to install an email app on the machine so where do I (WE) go from here
Any ideas or am I missing something!!! (Would not put it past me this week has been hell!!!)
You have to go onto your google account, and enable 2FA. Having done that there will be a place under Security where you can ask for an app-specific password. Then use that instead of your "YourGmailPassword’ and continue as before.
This presupposes that the process I outlined is not the one they’re now scrapping. What they were pushing a couple of years ago was OAUTH2, so if that is now what we have to use then i’m in the soup too.
Google continues to make changes like these in an effort to shut down people violating their terms of service and using Gmail as a transactional email service.
If you don’t want to keep having to find workarounds every few months, consider finding a transactional email provider. Some have free tiers that will suffice for low volume sending. Every single one I’ve looked into recently has had SMTP support, so you don’t even have to change your code just the credentials.
Yes, you are absolutely correct. I forgot that I did just that a while back. Getting old…
Besides, an application password is not a solution for use cases where the user of the application sends emails on their own behalf, as others mentioned earlier.
Not sure I understand what you mean. I have a gmail account, which I use via my email client here. It stopped working when they did away with the “allow-less-secure-apps” workaround. So that’s when I enabled 2FA and did the rest of the rigmarole I outlined above. That has worked ever since.