mindroot.coreplugins.email package¶
Submodules¶
mindroot.coreplugins.email.email_provider module¶
- class mindroot.coreplugins.email.email_provider.EmailProvider(config: Dict)[source]¶
Bases:
object- async check_emails(folder: str = 'INBOX', criteria: Dict = None, batch_size: int = None, max_messages: int = None, start_id: str = None) Dict[source]¶
Check for emails using IMAP
mindroot.coreplugins.email.imap_handler module¶
- class mindroot.coreplugins.email.imap_handler.IMAPHandler(config: Dict)[source]¶
Bases:
object- build_search_criteria(criteria: Dict = None, last_uid: str = None) str[source]¶
Build IMAP search criteria string
- async check_emails(folder: str = 'INBOX', criteria: Dict = None, batch_size: int = None, max_messages: int = None, start_id: str = None) Dict[source]¶
Check for emails in specified folder with pagination using UIDs
mindroot.coreplugins.email.mod module¶
- async mindroot.coreplugins.email.mod.check_emails(folder: str = 'INBOX', criteria: Dict = None, context=None) Dict[source]¶
Service to check for new emails
- async mindroot.coreplugins.email.mod.init_email_provider(config: Dict = None, context=None) bool[source]¶
Initialize the email provider with config
- async mindroot.coreplugins.email.mod.send_email(to: str, subject: str, body: str, context=None) Dict[source]¶
Service to send an email
- Parameters:
to – Recipient email address
subject – Email subject
body – Email body (can be plain text or HTML - auto-detected)
context – Optional context
- Returns:
Dict with success status and error info
mindroot.coreplugins.email.services module¶
- async mindroot.coreplugins.email.services.check_emails(config: Dict, folder: str = 'INBOX', criteria: Dict = None, batch_size: int = None, max_messages: int = None, start_id: str = None) Dict[source]¶
Service to check for new emails with pagination support
- async mindroot.coreplugins.email.services.get_provider() EmailProvider[source]¶
Get the provider instance, initializing with defaults if needed
- async mindroot.coreplugins.email.services.init_provider(config: Dict) None[source]¶
Initialize the email provider with config
mindroot.coreplugins.email.smtp_handler module¶
mindroot.coreplugins.email.test_batch module¶
mindroot.coreplugins.email.test_email module¶
mindroot.coreplugins.email.test_email_service module¶
Test script to verify email service functionality. Run this to test if email sending works with your configuration.