Overview
Section titled “Overview”Greentic has two email messaging packs:
| Pack | Use this when |
|---|---|
messaging-email | You want SMTP outbound email. |
messaging-microsoft-email | You want Microsoft Graph mail with delegated OAuth credentials. |
Inbound email is normally handled through an event provider or a provider webhook, such as SendGrid Inbound Parse, Mailgun Routes, AWS SES, or Microsoft Graph subscriptions when supported by the installed pack.
SMTP Setup (messaging-email)
Section titled “SMTP Setup (messaging-email)”-
Configure SMTP answers
answers.json {"setup_answers": {"messaging-email": {"host": "smtp.example.com","port": 587,"username": "mailer@example.com","password": "your-smtp-password","from_address": "support@example.com","tls_mode": "starttls"}}} -
Run setup
Terminal window gtc setup --answers answers.json ./my-bundle
Microsoft Graph Setup (messaging-microsoft-email)
Section titled “Microsoft Graph Setup (messaging-microsoft-email)”-
Configure Graph answers
answers.json {"setup_answers": {"messaging-microsoft-email": {"from_address": "support@example.com","graph_tenant_id": "your-tenant-id","ms_graph_client_id": "your-client-id","ms_graph_client_secret": "your-client-secret","ms_graph_refresh_token": "your-refresh-token"}}} -
Run setup
Terminal window gtc setup --answers answers.json ./my-bundle
Configuration Options
Section titled “Configuration Options”| Option | Required | Description |
|---|---|---|
host | Yes | SMTP server host name |
port | Yes | SMTP server port, commonly 587 |
username | Yes | SMTP account username |
password | Yes | SMTP password or app password |
from_address | Yes | Default sender email address |
tls_mode | Yes | TLS mode, for example starttls |
public_base_url | No | Public URL for webhook callbacks when the installed pack uses them |
Microsoft Graph
Section titled “Microsoft Graph”| Option | Required | Description |
|---|---|---|
from_address | Yes | Sender mailbox |
graph_tenant_id | Yes | Microsoft Entra tenant id |
ms_graph_client_id | Yes | Microsoft Graph OAuth client id |
ms_graph_client_secret | Yes | Microsoft Graph OAuth client secret |
ms_graph_refresh_token | Yes | OAuth refresh token for delegated mail access |
public_base_url | No | Public URL for webhook callbacks when the installed pack uses them |
Network Access
Section titled “Network Access”Email network requirements depend on the installed email pack and the mail transport you choose.
| Pack | Direction | Protocol and port | Purpose |
|---|---|---|---|
messaging-email | Outgoing | SMTP over TCP 587 with STARTTLS, or TCP 465 with implicit TLS | Outbound email sends through your SMTP provider |
messaging-email | Outgoing, legacy environments | SMTP over TCP 25 | Only when your SMTP provider and hosting environment still allow port 25 |
messaging-email | Incoming | None by default | Inbound email normally comes from a separate event provider or webhook-based mail service |
messaging-microsoft-email | Outgoing | HTTPS 443 to login.microsoftonline.com | Microsoft OAuth token exchange and refresh |
messaging-microsoft-email | Outgoing | HTTPS 443 to graph.microsoft.com | Microsoft Graph mail sends and mailbox operations |
messaging-microsoft-email | Incoming, when Graph subscriptions are enabled by the installed pack | HTTPS 443 from Microsoft Graph to Greentic | Mail change notifications to the public callback URL |
When you use webhook-based inbound email from another provider, expose the Greentic runtime through HTTPS on port 443 and configure that provider to call the declared ingress URL.
Features
Section titled “Features”Send Plain Text
Section titled “Send Plain Text”- id: send_email type: reply config: to: "{{user_email}}" subject: "Your Support Request" message: "Thank you for contacting us. We'll get back to you shortly."Send HTML
Section titled “Send HTML”- id: send_html_email type: reply config: to: "{{user_email}}" subject: "Welcome!" html: | <html> <body> <h1>Welcome to Our Service!</h1> <p>Thank you for signing up.</p> <a href="https://example.com/start">Get Started</a> </body> </html>With Attachments
Section titled “With Attachments”- id: send_with_attachment type: reply config: to: "{{user_email}}" subject: "Your Report" message: "Please find your report attached." attachments: - url: "https://example.com/report.pdf" filename: "report.pdf"CC and BCC
Section titled “CC and BCC”- id: send_copy type: reply config: to: "{{user_email}}" cc: "manager@example.com" bcc: "archive@example.com" subject: "Support Update" message: "Your ticket has been resolved."Handling Inbound Email
Section titled “Handling Inbound Email”name: handle_emailversion: "1.0"
nodes: - id: process type: reply config: to: "{{from_address}}" subject: "Re: {{subject}}" message: "Thank you for your email. We've received your message."
triggers: - type: email target: process