This project demonstrates how to send emails using Python's smtplib
library. The application allows users to input sender and receiver email addresses, a subject, and a message, and then sends the email via Gmail's SMTP server.
- Send emails using Gmail's SMTP server.
- Input-based configuration for sender and receiver email addresses, subject, and message.
- Basic error handling for email sending.
SendMsgUsingGmail.py
: Contains the main implementation for sending emails using thePythonGmail
class.
- Clone the repository or download the project files.
- Open the
SendMsgUsingGmail.py
file in your Python environment. - Run the script:
python SendMsgUsingGmail.py
- Enter the following details when prompted:
- Sender email address
- Receiver email address
- Email subject
- Email message
- The script will attempt to send the email and display a success or error message.
- Python 3.x installed on your system.
- Enable "Less secure app access" in the sender's Gmail account settings. (Note: This is not recommended for production use due to security concerns.)
- Replace the placeholder Gmail app password ('kghv ilil rsta zbcd') in the script with your actual Gmail app password.
- Add support for attaching files to emails.
- Implement encryption for secure email communication.
This project is for educational purposes only. Use it responsibly and ensure compliance with Gmail's terms of service and security guidelines.