This script serves as a straightforward MailTrap agent designed to interact with the Mailtrap library through prompts.
Example Prompt:
Please send an email to taherfattahi11@gmail.com with the subject "You are awesome!" and the body of the email should be: "Congratulations on successfully sending a test email with Mailtrap!"
I wrote an article that walks through how to build out the below script Can read that here
Clone the repository, set up the virtual environment, and install the required packages
git clone git@github.com:taherfattahi/mailtrap-agent.git
cd mailtrap-agent
python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
Copy the example env file
cp .env.example .env
Now copy your OpenAI API key - mailtrap token - mailtrap sender into the .env
file, and save the file. It should send up looking something like
OPENAI_API_KEY=sk-
MAILTAP_TOKEN=
MAILTAP_SENDER=
Feel free to contribute and implement new tools for this agent.🙂
Press Ctrl + C to exit the chat window at any time.
python3 mailtrap-agent.py