Recall & Review
beginner
What Flask extension is commonly used to send emails?
Flask-Mail is the extension used to send emails easily in Flask applications.
Click to reveal answer
beginner
Which configuration keys are essential to set up Flask-Mail?
You need to set MAIL_SERVER, MAIL_PORT, MAIL_USERNAME, MAIL_PASSWORD, and MAIL_USE_TLS or MAIL_USE_SSL.
Click to reveal answer
beginner
How do you create a simple email message in Flask-Mail?
Use the Message class: Message(subject, sender, recipients) and set the body with message.body = 'text'.
Click to reveal answer
beginner
What method sends the email after creating the Message object?
Call mail.send(message) where mail is the Flask-Mail instance.
Click to reveal answer
intermediate
Why is it important to use TLS or SSL when sending emails?
TLS or SSL encrypts the email connection, keeping your login and message data secure.
Click to reveal answer
Which Flask extension helps you send emails?
✗ Incorrect
Flask-Mail is designed specifically for sending emails in Flask.
What configuration key sets the SMTP server address?
✗ Incorrect
MAIL_SERVER defines the SMTP server address used to send emails.
Which method sends the email message?
✗ Incorrect
You call mail.send(message) to send the email.
What does the Message class require at minimum?
✗ Incorrect
Message needs subject, sender, and recipients to create an email.
Why use MAIL_USE_TLS or MAIL_USE_SSL?
✗ Incorrect
TLS or SSL encrypts the connection to keep data safe.
Explain how to send a simple email using Flask-Mail.
Think about the steps from setup to sending.
You got /6 concepts.
Why is email encryption important when sending emails from Flask?
Consider what could happen if data is sent unencrypted.
You got /4 concepts.