Ahmad Awais

NAVIGATE


SHARE


Generate Gmail App Password to Send emails with 2FA Two Factor Authenticated Accounts

Ahmad AwaisAhmad Awais

If you have 2FA two-factor authentication enabled for a Gmail account, you cannot use it as an alias to send emails by setting up the SMTP settings on Gmail. For that, you need to generate an App Password and use it in place of your actual password when setting up the SMTP details.

How to Generate Gmail App Passwords#

  1. Login to your Gmail account
  2. Navigate to the Google AppPasswords setting page https://security.google.com/settings/security/apppasswords
  3. In the select app choose Other (custom name)
  4. Give it an arbitrary name and press generate
  5. This will give you 16 characters tokenApp passwords let you sign in to your Google Account from apps on devices that don't support 2-Step Verification. You'll only need to enter it once so you don't need to remember it.

You can now use this token as your password in combination with your Gmail account and two-factor authentication will not be required.

No more failing Gmail emails due to 2FA#

Here’s how I set it up in Gmail.

Gmail Alias

That password is where you use the app password we generated above.

Peace! โœŒ๏ธ

Helping businesses understand developers. Head of Developer Relations RapidAPI.

๐Ÿ“Ÿ Edutainer at Node.js CLI Automation course (100 videos ยท 22 Projects) & VSCode.pro course (over 20K devs). ๐ŸŽฉ Award-winning Open Source Engineer & Dev Advocate ๐ŸฆŠ Google Developers Expert Web DevRel ๐Ÿš€ Mars Ingenuity Helicopter code contributor ๐Ÿ† 8th GitHub Stars Award recipient ๐ŸŒณ Node.js foundation Community Committee Outreach Lead, Member Linux Foundation, OpenAPI Business Governing Board, and DigitalOcean Navigator.

โœŒ๏ธ Author of various open-source dev-tools and software libraries used by millions of developers worldwide โ“ฆ WordPress Core Developer ๐Ÿ“ฃ TEDx Speaker with 100+ international talks.

๐Ÿ”ฅ Satya Nadella ยท CEO of Microsoft, said โ€” Awais is an awesome example for developers.
๐Ÿ™Œ Leading developers and publishing technical content for over a decade ๐Ÿ’œ Loves his wife (Maedah) โฏ Read more about Ahmad Awais.

๐Ÿ‘‹โ€ฆ Awais is mostly active on Twitter @MrAhmadAwais

๐Ÿ“จ

Developers Takeaway

Takeaway my professional opinion on open-source, developer relations, growing your business with family, and everything in between! Delivered to your inbox a couple of times every year. I'm even funny at times. I hate spam โ€” pinky-promise!

๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘ฉโ€๐Ÿ’ป 118,947 Developers Already Subscribed
Comments 0
There are currently no comments.