Sending emails in Django using Mailtrap

We will need to send emails in order to test the password reset module; configuring a mail server is outside the scope of this book and because not all readers are able to configure their own or already have one, we will use a service that allows us to simulate sending emails:

https://mailtrap.io/

Once a development server is registered and created, we must configure the following variables:

customlogin\settings.py

EMAIL_HOST = 'smtp.mailtrap.io'
EMAIL_HOST_USER = '<YourUserMailTrap>'
EMAIL_HOST_PASSWORD = '<YourPasswordMailTrap>'
EMAIL_PORT = '2525'

Which determine the host, user, password and port of the mail server respectively; With this, we are ready for the application to send emails.

- Andrés Cruz

En español

Andrés Cruz

Develop with Laravel, Django, Flask, CodeIgniter, HTML5, CSS3, MySQL, JavaScript, Vue, Android, iOS, Flutter

Andrés Cruz In Udemy

I agree to receive announcements of interest about this Blog.

!Courses from!

10$

On Udemy

There are 3d 11:22!


Udemy

!Courses from!

4$

In Academy

View courses

!Books from!

1$

See the books
¡Become an affiliate on Gumroad!