Bulk Email Sender with Personalized Content This project is a bulk email sender built using Streamlit and LangChain's ChatGroq model to generate personalized emails for each recipient. The emails are customized based on the client's name and the services they offer, such as E-commerce, Digital Marketing, etc.
This project is a bulk email sender built using Streamlit and LangChain's ChatGroq
model to generate personalized emails for each recipient. The emails are customized based on the client's name and the services they offer, such as E-commerce, Digital Marketing, etc. This project supports reading data from a CSV file and sending emails using Gmail.
ChatGroq
integrationClone the Repository
git clone https://github.com/codebytemirza/MY-CLIENT-BOT-AI-MAIL-SENDER.git
cd MY-CLIENT-BOT-AI-MAIL-SENDER
Create a Virtual Environment (Optional but recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
Install the Required Packages
Install all the necessary dependencies using pip
:
pip install -r requirements.txt
Set Up Environment Variables
You need to create a .env
file for your API key and email credentials. In the project root directory, create a .env
file:
touch .env
Add the following content to .env
:
GROQ_API_KEY=your_api_key
EMAIL_PASSWORD=your_app_specific_password
EMAIL_ADDRESS=[email protected]
your_app_specific_password
with your Gmail app-specific password.[email protected]
with your Gmail address.Run the Application
Start the Streamlit app by running:
streamlit run app.py
This will open a browser window with the Streamlit interface.
This project requires the following environment variables to function:
GROQ_API_KEY
: Your Groq API key for using ChatGroq
to generate personalized email content.EMAIL_PASSWORD
: Your Gmail app-specific password to send emails.EMAIL_ADDRESS
: Your Gmail address for sending emails.The .env
file should look like this:
GROQ_API_KEY=your_groq_api_key
EMAIL_PASSWORD=your_gmail_app_password
EMAIL_ADDRESS=your_gmail_address
Upload CSV File: The app requires a CSV file as input. The CSV file should contain the following columns:
Name
: The name of the client.Email
: The email address of the client.Service
: The service you are offering to the client.Generate Emails: Once the CSV is uploaded, click the Send Emails button to generate and send personalized emails to each client.
Success and Error Messages: You will get real-time feedback if the email was sent successfully or if there was an error.
Your CSV file should be in the following format:
Name,Email,Service
Ecommerce by Experts,[email protected],E-commerce
Seordev Digital Marketing Agency,[email protected],Digital Marketing
Ubuntu Education Consultancy,[email protected],Education Consultancy
├── app.py # Main Streamlit app
├── requirements.txt # Dependencies list
├── .env # Environment variables (GROQ_API_KEY, EMAIL_PASSWORD, EMAIL_ADDRESS)
└── README.md # Project documentation
Contributions are welcome! Please follow the steps below to contribute:
git checkout -b feature-branch
).git commit -m 'Added feature'
).git push origin feature-branch
).This project is licensed under the MIT License.
To get a Groq API key, follow these steps:
Sign Up or Log In to the Groq Developer Portal.
Go to the API Keys section and click Create New API Key.
Copy the generated API key and store it securely.
Add it to your .env
file as shown below:
GROQ_API_KEY=your_groq_api_key_here