Email Providers and Bindings
Memoh allows your Bot to send and receive emails, providing another powerful channel for communication and task management.
Concept: Email as a Bot Channel
Connecting email to your Bot involves two steps:
- Email Provider: Configure a connection to an email service (like Mailgun or a generic SMTP server).
- Email Binding: Link a specific email address from a provider to a Bot.
Email Provider
Manage your email service connections from the Email Provider page in the sidebar.
Email providers are scoped per user: each user configures and sees only their own email accounts, and bot bindings can only use providers owned by the same user. Different users may reuse the same provider name without conflict.
Gmail OAuth
For Gmail providers, the OAuth application credentials (client ID / client secret) are no longer entered in the UI — the deployment operator configures them once in conf/oauth-clients.toml on the server. Users only go through the Gmail sign-in flow.
Creating a Provider
- Navigate to the Email Provider page from the sidebar.
- Click Add Email Provider.
- Choose the provider type:
- Mailgun: For high-volume delivery.
- Generic SMTP: For traditional email servers.
- Fill in the required fields (e.g.,
domain,api_key,host,port,username,password). - Click Create.
Bot Email Bindings
Configure your bot's email capabilities from the Email tab in the Bot Detail page.
Adding a Binding
- Click Add Binding.
- Select the Email Provider you created.
- Provide the Email Address to be associated with the bot.
- Set the bot's permissions:
- Can Read: If enabled, the bot can check and process incoming emails.
- Can Write: If enabled, the bot can compose and send outgoing emails.
- Can Delete: If enabled, the bot can manage its own email inbox.
- Click Create.
Outbox and History
The Email tab also provides an Outbox showing an audit log of all emails sent by the bot:
- To: The recipient's email address.
- Subject: The email's subject line.
- Status: Whether the email was sent successfully.
- Sent At: The timestamp of the email delivery.
Bot Interaction
- The bot can use its email permissions to send reports, respond to user inquiries, or trigger actions based on incoming mail.
- Outgoing emails are tracked in the outbox for monitoring and troubleshooting.
- The bot handles email in a structured way, allowing it to "converse" via email just as it does via chat.