Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Mail.app Integration for Email Creation #7

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

2b3pro
Copy link

@2b3pro 2b3pro commented Jan 19, 2025

This PR introduces Mail.app integration to the AppleScript MCP server, adding the ability to programmatically create new emails. Key changes:

  • Adds new mailCategory with initial create_email functionality
  • Implements proper URL encoding for subject and body text to handle special characters
  • Uses Mail.app's mailto protocol for reliable email creation
  • Includes input validation through JSON schema for recipient, subject, and body fields

The implementation uses AppleScript's native URL handling capabilities combined with proper character encoding to ensure reliable email creation across different text inputs.

Note: the mailto command in AppleScript provides a workaround for a strange quirky inclusion of a carriage return in Apple Mail using the make new message method that turns the message into quoted message rather than the main body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant