This Flask application allows you to send emails through a simple web interface. It uses the Flask web framework, and emails are sent via Gmail SMTP. Below is a brief overview of the project:
-
Python installed on your machine.
-
Flask and required dependencies installed. You can install them using the following command:
pip install flask
-
Clone the repository:
git clone https://github.com/your-username/flask-email-sender.git cd flask-email-sender
-
Run the application:
python app.py
-
Open your web browser and go to http://127.0.0.1:5000/.
- Access the web interface by visiting http://127.0.0.1:5000/.
- Fill out the email sender, receiver, subject, and body fields.
- Click the "Send Email" button to send the email.
In the app.py
file, find the send_email
function. Replace 'your_password'
with your actual Gmail password. Note: It's recommended to use an application-specific password instead of your main Gmail password.
smtp.login(email_sender, 'your_password')
- This application uses Gmail's SMTP server. Make sure to enable "Less secure app access" in your Gmail account settings.
- For enhanced security, consider using an application-specific password for SMTP authentication.
Feel free to contribute by submitting issues or pull requests.
This project is licensed under the GNU General Public License v3.0.
- Flask: https://flask.palletsprojects.com/
- Python Email Message Library: https://docs.python.org/3/library/email.message.html
- SMTP Library: https://docs.python.org/3/library/smtplib.html