Closed
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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>
- 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>
for more information, see https://pre-commit.ci
- 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>
Add ability to forward emails to new recipients with original body and attachments preserved. Supports custom sender address override and optional additional message before forwarded content. - Add ForwardEmailResponse model - Add forward_email abstract method to EmailHandler - Implement get_email_for_forward in EmailClient for IMAP fetch - Implement forward_email in ClassicEmailHandler with SMTP send - Add forward_email MCP tool with full parameter support - Add comprehensive tests for handler and MCP tool Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
for more information, see https://pre-commit.ci
- Extract html_body from emails alongside plain text body - Forward HTML-only emails as HTML with proper formatting - Use justhtml to convert HTML to clean text for multipart emails - Add RFC 5322 Date header to forwarded emails - Add tests for HTML, plain text, multipart, and Date header Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tests cover: - Plain text email extraction - HTML-only email extraction with is_html flag - Multipart email (both plain and HTML) - Email with attachments - Email not found case - Raw email extraction failure - Custom mailbox parameter Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Extract helper methods to reduce cyclomatic complexity: - _decode_part_content: decode MIME part with charset handling - _extract_attachment_part: extract attachment as MIMEApplication - _extract_forward_parts: extract body, html_body, attachments - _build_html_forward_content: build HTML forward body - _build_plain_forward_content: build plain text forward body - _create_forward_message: create MIME message with attachments - _set_header_with_encoding: set header with UTF-8 if needed Also use ternary operator for forward_body assignment (SIM108). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Pass tls_context to forward_email's SMTP connection to respect the verify_ssl configuration, enabling self-signed certificate support when forwarding emails. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
13c2efa to
3986414
Compare
Member
|
I don't think we need this tool... Close for now. Welcome to raise an issue! |
Author
|
Confused...is there another way to forward an email using the server? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
forward_emailMCP tool to forward emails to new recipients with original body and attachments preservedTest plan
ClassicEmailHandler.forward_email()methodget_email_for_forward()IMAP fetch helperforward_emailwith various options🤖 Generated with Claude Code