SMTP Channel Provider
Configuration
The configuration steps are explained in the smtp configuration page.
Usage
1. When configured with
{
"from": {
"email": "notifications@example.com",
"name": "Example Notifications"
},
"host": "smtp.gmail.com",
"password": "your-app-password",
"port": 587,
"reply_to": {
"email": "support@example.com",
"name": "Example Support"
},
"security": "starttls",
"username": "user@example.com"
}2. With a channel token
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"from": {
"description": "Default sender email address",
"properties": {
"email": {
"description": "Sender email address",
"format": "email",
"type": "string"
},
"name": {
"description": "Sender name",
"type": "string"
}
},
"required": [
"email"
],
"type": "object"
},
"host": {
"description": "SMTP server hostname",
"examples": [
"smtp.gmail.com",
"smtp.example.com"
],
"type": "string"
},
"password": {
"description": "SMTP authentication password",
"type": "string"
},
"port": {
"description": "SMTP server port",
"examples": [
25,
465,
587
],
"maximum": 65535,
"minimum": 1,
"type": "integer"
},
"reply_to": {
"description": "Reply-to email address",
"properties": {
"email": {
"description": "Reply-to email address",
"format": "email",
"type": "string"
},
"name": {
"description": "Reply-to name",
"type": "string"
}
},
"required": [
"email"
],
"type": "object"
},
"security": {
"default": "starttls",
"description": "SMTP security/encryption method",
"enum": [
"none",
"ssl",
"starttls"
],
"examples": [
"starttls"
],
"type": "string"
},
"username": {
"description": "SMTP authentication username",
"type": "string"
}
},
"required": [
"host",
"port",
"username",
"password",
"from"
],
"title": "SMTPConfig",
"type": "object"
}3. With Broadcast
{
"action_url": "https://example.com",
"category": "example",
"content": "I come from broadcast",
"custom_attributes": {},
"id": "d1b3b3b3-3b3b-3b3b-3b3b-3b3b3b3b3b3b",
"overrides": {},
"recipients": [
{
"custom_attributes": {
"plan": "enterprise",
"preferred_pronoun": "They",
"pricing_version": "v10"
},
"email": "test@example.com",
"external_id": "83d987a-83fd034",
"first_name": "Person",
"last_name": "Doe",
"phone_numbers": [
"+1 5005550001"
]
}
],
"title": "Hello, World!",
"topic": "example"
}The channel handler triggers a HTTP request
POST smtp://smtp.gmail.com:587With payload
{
"Config": {
"from": {
"email": "notifications@example.com",
"name": "Example Notifications"
},
"host": "smtp.gmail.com",
"password": "your-app-password",
"port": 587,
"reply_to": {
"email": "support@example.com",
"name": "Example Support"
},
"security": "starttls",
"username": "user@example.com"
},
"Message": "RnJvbTogRXhhbXBsZSBOb3RpZmljYXRpb25zIDxub3RpZmljYXRpb25zQGV4YW1wbGUuY29tPg0KVG86IERhbiA8ZGFuQGV4YW1wbGUuY29tPg0KUmVwbHktVG86IEV4YW1wbGUgU3VwcG9ydCA8c3VwcG9ydEBleGFtcGxlLmNvbT4NClN1YmplY3Q6IEhlbGxvLCBXb3JsZCENCk1JTUUtVmVyc2lvbjogMS4wDQpDb250ZW50LVR5cGU6IG11bHRpcGFydC9hbHRlcm5hdGl2ZTsgYm91bmRhcnk9ImJvdW5kYXJ5Ig0KDQotLWJvdW5kYXJ5DQpDb250ZW50LVR5cGU6IHRleHQvcGxhaW47IGNoYXJzZXQ9IlVURi04Ig0KDQpJIGNvbWUgZnJvbSBicm9hZGNhc3QNCi0tYm91bmRhcnkNCkNvbnRlbnQtVHlwZTogdGV4dC9odG1sOyBjaGFyc2V0PSJVVEYtOCINCg0KSSBjb21lIGZyb20gYnJvYWRjYXN0DQotLWJvdW5kYXJ5LS0NCg==",
"Payload": {
"from": {
"email": "notifications@example.com",
"name": "Example Notifications"
},
"html_body": "I come from broadcast",
"reply_to": {
"email": "support@example.com",
"name": "Example Support"
},
"subject": "Hello, World!",
"text_body": "I come from broadcast",
"to": {
"email": "dan@example.com",
"name": "Dan"
}
}
}