Skip to content

Instantly share code, notes, and snippets.

@ahmad19
Created August 24, 2022 13:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahmad19/38edc8b3061ee680c80acda7a7b5e0c9 to your computer and use it in GitHub Desktop.
Save ahmad19/38edc8b3061ee680c80acda7a7b5e0c9 to your computer and use it in GitHub Desktop.
gmail app password creation
Account with 2-step Verification
If your Gmail account uses 2-step verification, you will need to get an app password and use that instead of your regular password. If you don't use 2-step verification, I recommend turning it on to avoid getting the emails blocked by Google.
To create an app password, go to your Google account settings and navigate to the "Security" tab. Under "Signing in to Google", click on the "App passwords" menu item (this will only be available if you have 2-step verification turned on). Next, select Other (Custom name) under the "Select app" dropdown and enter the name of your app or something else useful. Click "Generate" and your new app password will appear on the screen. Make sure you copy it before closing the window, or you won't be able to see the password again.
Now, in your Rails app mailer settings, replace the <gmail_password> with the new app password instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment