Skip to content

feat: add verify_ssl option for SMTP connections#105

Merged
Wh1isper merged 4 commits intoai-zerolab:mainfrom
jkp:feat/verify-ssl
Jan 19, 2026
Merged

feat: add verify_ssl option for SMTP connections#105
Wh1isper merged 4 commits intoai-zerolab:mainfrom
jkp:feat/verify-ssl

Conversation

@jkp
Copy link

@jkp jkp commented Jan 17, 2026

Summary

  • Add verify_ssl field to EmailServer model (defaults to true)
  • Add MCP_EMAIL_SERVER_SMTP_VERIFY_SSL environment variable support
  • Wire through smtp_verify_ssl parameter in EmailSettings.init() and from_env()

This allows disabling SSL certificate verification for SMTP connections, which is useful for local mail servers with self-signed certificates (e.g., ProtonMail Bridge).

Test plan

  • Existing tests pass
  • Manual test with ProtonMail Bridge using MCP_EMAIL_SERVER_SMTP_VERIFY_SSL=false

🤖 Generated with Claude Code

Add MCP_EMAIL_SERVER_SMTP_VERIFY_SSL environment variable to disable
SSL certificate verification for SMTP connections. Useful for local
mail servers with self-signed certificates (e.g., ProtonMail Bridge).

Defaults to true (verify certificates).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Jan 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Jamie Kirkpatrick and others added 3 commits January 17, 2026 11:15
- Add MCP_EMAIL_SERVER_SMTP_VERIFY_SSL to environment variables table
- Add usage section for self-signed certificates (e.g., ProtonMail Bridge)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add _create_smtp_ssl_context() module-level helper for creating
  permissive SSL context when verify_ssl=False
- Add _get_smtp_ssl_context() method to EmailClient
- Pass tls_context to aiosmtplib.SMTP in send_email()
- Add tests for SSL context creation

This enables the verify_ssl config option (added in ccb2c0b) to actually
take effect when sending emails, allowing use of self-signed certificates
like those from Proton Mail Bridge.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Wh1isper Wh1isper merged commit 40d1b58 into ai-zerolab:main Jan 19, 2026
9 checks passed
jbkjr pushed a commit to jbkjr/mcp-email-server that referenced this pull request Jan 25, 2026
Merged latest upstream changes including:
- verify_ssl option for SMTP connections (PR ai-zerolab#105)
- Batch fetch emails performance optimization (PR ai-zerolab#107)
- Pre-commit updates

Preserved local features:
- Folder management tools
- Label management tools (ProtonMail)
- Mark emails as read/unread
- Improved mailbox parameter descriptions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

2 participants