{emayili} Updated Gmail Authentication

A recent announcement from Google stated that from 30 May 2022 they will no longer support login via username and password (this is the “less secure” option). The change will have an impact for people using the {emayili} package to send email from R, but will also affect many others who use this form of authentication to access their emails via desktop email clients. In this short post I detail how to work around this by using an application password.

To help keep your account secure, starting May 30, 2022, Google will no longer support the use of third-party apps or devices which ask you to sign in to your Google Account using only your username and password.

Please note this deadline does not apply to Google Workspace or Google Cloud Identity customers. The enforcement date for these customers will be announced on the Workspace blog at a later date.

  1. Login to your Gmail account.
  2. Click on your user icon (at the top-right of the screen) and then click the Manage your Google Account button.
  3. Select the Security tab.
  4. Enable 2-step verification.
Enabling 2-step verification.
  1. Click on the App passwords link. You’ll probably be prompted for your password.
  2. Click the Select app drop-down and select “Mail”.
  3. Click the Select device drop-down and select “Other (Custom name)”. Specify a name for the device. I just typed “emayili”.
  4. Press the button.
  5. A dialog will pop up with the password highlighted. Stash this password somewhere safe.
Accessing the application password.
  1. Press the button.

Use the application password wherever you would have normally use your account password.