configure_service
Add a new email service configuration at runtime for immediate email sending and inbox monitoring via SMTP, API, local, or webhook.
Instructions
Configure a new email service dynamically.
Adds a new email service configuration at runtime. The service will be available for sending emails and inbox checking immediately.
Args: name: Unique name for the service (e.g., "my-sendgrid", "dev-mailhog") type: Service type - "smtp", "api", "local", or "webhook" config: Service-specific configuration dictionary enabled: Whether the service should be enabled (default: True)
Returns: Dictionary with configuration result: { "success": bool, "service": str, # Service name "type": str, # Service type "message": str # Success/error message }
Examples: # Configure SendGrid API service configure_service( name="my-sendgrid", type="api", config={ "api_key": "your-sendgrid-key", "api_url": "https://api.sendgrid.com/v3/mail/send", "from_email": "noreply@yourdomain.com", "service_type": "sendgrid" } )
# Configure local MailHog for testing
configure_service(
name="local-testing",
type="local",
config={
"smtp_server": "localhost",
"smtp_port": 1025,
"http_url": "http://localhost:8025",
"service_type": "mailhog"
}
)Notes: - Service names must be unique - Configuration is stored in memory (not persisted) - Use list_services() to see available services
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| type | Yes | ||
| config | Yes | ||
| enabled | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||