feat(email): add consent-gated IMAP/SMTP email channel

This commit is contained in:
张涔熙
2026-02-07 11:03:34 +08:00
parent 18ec651b34
commit cfe43e4920
5 changed files with 916 additions and 0 deletions

View File

@@ -77,6 +77,17 @@ class ChannelManager:
logger.info("Feishu channel enabled")
except ImportError as e:
logger.warning(f"Feishu channel not available: {e}")
# Email channel
if self.config.channels.email.enabled:
try:
from nanobot.channels.email import EmailChannel
self.channels["email"] = EmailChannel(
self.config.channels.email, self.bus
)
logger.info("Email channel enabled")
except ImportError as e:
logger.warning(f"Email channel not available: {e}")
async def start_all(self) -> None:
"""Start WhatsApp channel and the outbound dispatcher."""