Sending Emails From Your App Using Gmail or Outlook
Learn how to use your accounts to send emails from your project
Email has become essential to modern web applications, serving various functions such as user authentication, project updates through newsletters, and customer support.
However, paying for a domain and associated email service can be expensive for small or personal projects. In other cases, you may need to test your email setup without relying on a paid or official service.
In this article, we’ll explore how you can use your accounts to send emails, whether for testing, debugging, or building a simple notification system for your projects.
Simple authentication and app passwords
In the past, it was easy to connect to the SMTP server of personal accounts like Gmail or Outlook using your email and password as login credentials. However, this approach is no longer feasible with the widespread adoption of two-factor authentication (2FA).
Fortunately, there’s a workaround called “app passwords”. These special passwords bypass 2FA and provide a simple login for specific applications or devices.
App passwords don’t require 2FA and are typically tied to individual devices or…