This MailMate bundle integrates AI-powered email composition assistance into MailMate, supporting both Anthropic's Claude and OpenAI's GPT models.
- AI-assisted email drafts
- Support for both Anthropic and OpenAI APIs
- Customizable settings via configuration file
- Works with both plain text and HTML emails
-
Clone this repository into your MailMate bundles directory:
git clone https://github.com/mickn/mailmate-ai-assistant.git ~/Library/Application\ Support/MailMate/Bundles/GPTAssistant.mmbundle
-
Edit the
config.ini
file in the bundle directory:- Set
ApiProvider
to eitheranthropic
oropenai
- Add your API key to
ApiKey
- Optionally, change the
Model
if desired
- Set
-
Make the script executable:
chmod +x ~/Library/Application\ Support/MailMate/Bundles/GPTAssistant.mmbundle/Support/bin/gpt_assist.py
-
Restart MailMate
- Draft an email. Either a new email, or a reply.
- (Optional) Briefly type your response. E.g. 'What time?'
- Use the keyboard shortcut Ctrl+C (or the command from the menu) to invoke the AI assistant.
- The GPT will turn your draft into a full email.
Due to limitations of Mailmate, it needs to create a new draft. If anyone knows any workarounds: please let me know!
Edit the config.ini
file to change settings:
ApiProvider
: Set toanthropic
oropenai
ApiKey
: Your API key for the chosen providerModel
: The AI model to use (e.g.,claude-3-sonnet-20240229
for Anthropic orgpt-3.5-turbo
for OpenAI)
If you encounter issues:
- Check the log file at
/tmp/ai_assist.log
for error messages. - Ensure your API key is correct and has the necessary permissions.
- Verify that the
config.ini
file is properly formatted and in the correct location. - Make sure the script has execution permissions.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.