Sending Emails From Your App Using Gmail or Outlook

Learn how to use your accounts to send emails from your project

Francesco Pastore
5 min readOct 15, 2024

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.

Image by Muhammad Ribkhan from Pixabay

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…

--

--

Francesco Pastore
Francesco Pastore

Written by Francesco Pastore

An engineering student in Milan and a web developer for an IT company. Write about programming and cybersecurity topics.

No responses yet

What are your thoughts?