+ Reply to Thread
Results 1 to 5 of 5

Send Email to smtp.gmail.com from VBA after 5/30/2022

  1. #1
    Forum Contributor
    Join Date
    02-25-2022
    Location
    Dallas, Texas
    MS-Off Ver
    Office 365
    Posts
    174

    Send Email to smtp.gmail.com from VBA after 5/30/2022

    I have several personal Excel/Word VBA addins I've created that send email using smtp.gmail.com as SMTP server. I use my email address and password and turn on "Allow less secure apps" option in my GMAIL account. Everything works well.* I use a third party app I've had for about 15 years. **

    On May 30, 2022 Google will disable "Allow less secure apps".* Has anyone addressed this issue.* I'm not using Outlook for my personal use.

    On my Gmail Account.
    Some apps and devices use less secure sign-in technology, which makes your account vulnerable. You can turn off access for these apps, which we recommend, or turn it on if you want to use them despite the risks. Google will automatically turn this setting OFF if it’s not being used. Learn moreAllow less secure apps: ONOn May 30, 2022, this setting will no longer be available. Learn more

  2. #2
    Registered User
    Join Date
    07-09-2015
    Location
    Rockford, IL
    MS-Off Ver
    2010
    Posts
    1

    Re: Send Email to smtp.gmail.com from VBA after 5/30/2022

    Following this. I run a number of sheets using the mail tool and it just broke for me. Any updates anyone?

  3. #3
    Forum Contributor
    Join Date
    02-25-2022
    Location
    Dallas, Texas
    MS-Off Ver
    Office 365
    Posts
    174

    Re: Send Email to smtp.gmail.com from VBA after 5/30/2022

    I am testing a tool called easendmail from EmailArchitech. I got it working. I'm working on refreshing the accesstoken.

  4. #4
    Registered User
    Join Date
    03-21-2018
    Location
    Raleigh, NC
    MS-Off Ver
    Excel 2013
    Posts
    36

    Re: Send Email to smtp.gmail.com from VBA after 5/30/2022

    I have a similar problem I have an excel workbook using VBA to send individual gmails to multiple “google group” members. It had been working for 4 years until Gmail added Oauth. I have been going in circles with EmailArchitech. I can test the app in test mode and it will send the email if I add include read. Compose, send and delete permissions AND click through the alarms. When I configure it as production I get not verified message and go through a similar routine that "test" needed.
    Currently the file is on my local disk. I run this from my google account xxxx@gmail,com and my google account has owner permissions for gmail. I only want to send emails not read, compose or delete.

    When I try to Verify the API it needs a domain.

    Mogul, let us know if you get a fix.

  5. #5
    Registered User
    Join Date
    03-21-2018
    Location
    Raleigh, NC
    MS-Off Ver
    Excel 2013
    Posts
    36

    Re: Send Email to smtp.gmail.com from VBA after 5/30/2022

    got this from DiamTo at stackoverflow. It is easy and you don't have to use oauth .....

    To be clear Google did not add Oauth2. The option of using Xoauth2 with the smtp server has always been there. Nor is google forcing you to use Xoauth2 with the smtp server.

    What google did was remove the option for Less secure apps & your Google Account. Which allowed you to use the google account password to connect to the smtp server.

    If you have 2fa enabled on the google account you can create an apps password and use that password instead of the actual password for the google account in your code.

    .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "AppsPassword"
    If you do not want to use an apps password then yes you will need to configure Xoauth2. xoauth2-protocol Its been a very long time since i have touched VBA I dont think this is something i can help with. But a quick google search shows it should be supported Oauth

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. if Cell Changes True False Send an Email using SMTP
    By tome10 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 09-10-2020, 01:10 AM
  2. Code to send email with table on the email body via gmail
    By ivhee00 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-19-2017, 12:24 AM
  3. [SOLVED] VBA Code for Googles Gmail Email send
    By sintek in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-15-2016, 08:12 AM
  4. [SOLVED] Macro to send email via gmail program
    By excelnoob_15 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-13-2016, 06:52 PM
  5. [SOLVED] Issue with Smtp.gmail
    By electriczen in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-03-2016, 03:25 PM
  6. [SOLVED] Button to send an email via Gmail
    By Drayde in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-28-2014, 08:23 AM
  7. Send Email to SMTP Server without CDO
    By yawnzzzz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-23-2013, 03:11 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1