Email (SMTP) Integration
What It Enables
Send automated emails from your workflows using SMTP:
- Notifications: Alert users about events and updates
- Reports: Send scheduled reports via email
- Alerts: Critical system notifications
- Confirmations: Order confirmations, registrations
- Newsletters: Automated email campaigns
- Transactional Emails: Receipts, password resets
Prerequisites
- SMTP server access (Gmail, Outlook, SendGrid, etc.)
- SMTP credentials (username/password or API key)
- Sender email address
- Understanding of email deliverability basics
How to Connect
Step 1: Get SMTP Credentials
Choose your email provider:
Gmail
- Enable 2-factor authentication
- Generate App Password: myaccount.google.com/apppasswords
- Use App Password (not your regular password)
- SMTP Server:
smtp.gmail.com - Port:
587(TLS) or465(SSL)
Outlook/Office 365
- SMTP Server:
smtp.office365.com - Port:
587 - Use your email and password
- Enable SMTP AUTH in admin center
SendGrid
- Create API key in SendGrid dashboard
- SMTP Server:
smtp.sendgrid.net - Port:
587 - Username:
apikey - Password: Your API key
Custom SMTP
- Get SMTP server address from provider
- Get port number (usually 587, 465, or 25)
- Get authentication credentials
- Check TLS/SSL requirements
Step 2: Add Email Action
- In your flow, click “+” to add a step
- Search for “Email” or “SMTP”
- Select “Send Email” action
Step 3: Configure Connection
- Click “Connect” or “+ New Connection”
- Enter SMTP details:
- SMTP Host: Server address
- SMTP Port: Port number
- Username: Your email or username
- Password: Password or API key
- From Email: Sender address
- From Name: Sender display name
- Click “Test Connection”
- Click “Save”
Step 4: Compose Email
- To: Recipient email(s)
- Subject: Email subject line
- Body: Email content (HTML or plain text)
- CC/BCC: Optional additional recipients
- Attachments: Optional files
Step 5: Test
- Click “Test” to send test email
- Check recipient inbox (and spam folder)
- Verify formatting and content
Email Configuration
Basic Fields
To (Required)
- Single email:
user@example.com - Multiple emails:
user1@example.com, user2@example.com - From data: ``
Subject (Required)
Order Confirmation #
Body (Required)
- Plain text or HTML
- Can include data from previous steps
- Use HTML for formatting
Optional Fields
CC (Carbon Copy)
- Visible to all recipients
- Use for transparency
BCC (Blind Carbon Copy)
- Hidden from other recipients
- Use for privacy
Reply-To
- Different from sender
- Where replies should go
Attachments
- File URLs or base64 data
- Check size limits
HTML Email Templates
Simple Template
<html>
<body>
<h1>Hello !</h1>
<p>Thank you for your order.</p>
<p>Order ID: <strong></strong></p>
<p>Total: $</p>
</body>
</html>
Professional Template
<html>
<head>
<style>
body { font-family: Arial, sans-serif; }
.header { background: #2C3E50; color: white; padding: 20px; }
.content { padding: 20px; }
.button { background: #3498db; color: white; padding: 10px 20px; text-decoration: none; }
</style>
</head>
<body>
<div class="header">
<h1>Defense Catalyst</h1>
</div>
<div class="content">
<p>Hi ,</p>
<p></p>
<a href="" class="button">Take Action</a>
</div>
</body>
</html>
Responsive Template
Use inline CSS for better email client compatibility:
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<table width="600" cellpadding="20">
<tr>
<td style="font-family: Arial; font-size: 16px;">
Your content here
</td>
</tr>
</table>
</td>
</tr>
</table>
Common Errors & Fixes
“Authentication failed”
Cause: Invalid credentials Fix:
- Verify username and password are correct
- For Gmail, use App Password (not regular password)
- Check 2FA is enabled (if required)
- Verify SMTP server address is correct
“Connection timeout”
Cause: Cannot reach SMTP server Fix:
- Check SMTP server address
- Verify port number (587, 465, or 25)
- Check firewall isn’t blocking connection
- Try different port (TLS vs SSL)
“Relay access denied”
Cause: SMTP server won’t relay for your domain Fix:
- Authenticate with valid credentials
- Use authorized sender address
- Check SMTP server allows relay
- Verify sender domain is authorized
“Message rejected”
Cause: Email content or recipient rejected Fix:
- Check recipient email is valid
- Verify sender email is authorized
- Check for spam trigger words
- Ensure HTML is valid
- Check attachment size limits
“TLS/SSL error”
Cause: Encryption configuration mismatch Fix:
- Try port 587 with TLS
- Try port 465 with SSL
- Check “Require TLS” setting
- Update to latest TLS version
“Rate limit exceeded”
Cause: Too many emails sent Fix:
- Check provider’s sending limits
- Reduce email frequency
- Implement delays between sends
- Upgrade to higher tier plan
Test Checklist
- Connection successful
- Test email received
- Subject line correct
- Body content displays properly
- HTML formatting works
- Links are clickable
- Images load (if any)
- Not in spam folder
- Attachments included (if any)
- Reply-to address correct
Tips & Best Practices
Deliverability
- Use reputable SMTP provider: Gmail, SendGrid, etc.
- Authenticate domain: SPF, DKIM, DMARC records
- Avoid spam words: “Free”, “Act now”, excessive caps
- Include unsubscribe: For marketing emails
- Monitor bounce rate: Remove invalid addresses
- Warm up new domains: Start with low volume
Content
- Clear subject lines: Descriptive, not clickbait
- Personalize: Use recipient name and relevant data
- Mobile-friendly: Test on mobile devices
- Plain text alternative: Include for accessibility
- Test before sending: Always send test emails
- Proofread: Check spelling and grammar
Performance
- Batch sending: Group emails when possible
- Async processing: Don’t block workflow
- Handle failures: Retry logic for temporary errors
- Monitor metrics: Track delivery, opens, clicks
Security
- Protect credentials: Never expose SMTP passwords
- Use TLS/SSL: Encrypt email transmission
- Validate inputs: Prevent email injection
- Limit recipients: Prevent abuse
- Audit logs: Track who sends what
Compliance
- CAN-SPAM: Include physical address, unsubscribe
- GDPR: Get consent, allow data deletion
- CASL: Canadian anti-spam law
- Opt-out: Honor unsubscribe requests immediately
Advanced Patterns
Dynamic Content
<p>Hi ,</p>
<p>As a premium member, you get exclusive benefits!</p>
<p>Upgrade to premium for more features.</p>
Conditional Sending
Condition: Only send if is true
Action: Send Email
Email with Attachment
Attachment URL:
Or
Attachment Data:
Follow-up Sequence
1. Send welcome email immediately
2. Wait 3 days
3. Send tips email
4. Wait 7 days
5. Send survey email
Error Notification
Trigger: Flow fails
Action: Send email to admin
Subject: "Flow Failed: "
Body: Error details and logs
Email Provider Limits
Gmail
- Daily limit: 500 emails/day (free), 2000/day (Workspace)
- Recipients per email: 500
- Attachment size: 25 MB
Outlook
- Daily limit: 300 emails/day
- Recipients per email: 500
- Attachment size: 20 MB
SendGrid
- Free tier: 100 emails/day
- Paid tiers: Up to millions/month
- Rate limit: Varies by plan
Custom SMTP
- Check with your provider
- Typically 100-1000/hour
- May have monthly limits
Alternatives
For High Volume
- SendGrid: Transactional email service
- Mailgun: Developer-focused email API
- Amazon SES: Scalable email service
- Postmark: Transactional email
For Marketing
- Mailchimp: Email marketing platform
- Constant Contact: Marketing automation
- HubSpot: Full marketing suite
For Transactional
- Twilio SendGrid: Reliable delivery
- Postmark: Fast transactional emails
- Amazon SES: Cost-effective at scale
Troubleshooting Deliverability
Emails Going to Spam
Check:
- SPF record configured
- DKIM signature present
- DMARC policy set
- Sender reputation good
- Content not spammy
- Unsubscribe link present
Tools:
- mail-tester.com - Test spam score
- mxtoolbox.com - Check DNS records
Emails Not Delivered
Check:
- Recipient email valid
- Not on blocklist
- SMTP logs for errors
- Bounce notifications
- Provider sending limits
Related Documentation
- Core Concepts: Data Mapping
- Troubleshooting: Connection Problems
- Error Reference
- Limits & Reliability
Example Use Cases
Order Confirmation
New order → Format email → Send confirmation
Daily Report
Schedule (daily) → Generate report → Email to team
Error Alert
Flow fails → Format error details → Email to admin
Welcome Email
New user → Send welcome email → Track engagement
Password Reset
Reset request → Generate token → Email reset link
Need Help?
- Check Troubleshooting Hub
- Review Error Reference
- Contact Support
- Test with mail-tester.com