> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.swellsystem.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# SMTP Settings

# SMTP Settings

Configure email sending so you can send invoices, notifications, and client communications from SWELLEnterprise.

## What are SMTP Settings?

SMTP (Simple Mail Transfer Protocol) settings configure how SWELL sends emails:
- **System Notifications**: Booking confirmations, invoice reminders
- **Client Communications**: Invoice emails, proposal emails
- **Internal Emails**: Team notifications, reminders

## Why Configure SMTP?

Without SMTP configured:
- ❌ Can't send invoices to clients
- ❌ Booking confirmations won't send
- ❌ Notification emails won't work
- ❌ System emails fail

With SMTP configured:
- ✅ Send professional invoices
- ✅ Automatic booking confirmations
- ✅ Notification emails work
- ✅ Client communications sent

## Accessing SMTP Settings

1. Go to **Settings** → **SMTP Settings**
2. Or go to **Email** → **Settings** → **SMTP**
3. You'll see the SMTP configuration form

## SMTP Configuration

### Required Information

**SMTP Host:**
- Your email server address
- Examples:
  - `smtp.mailgun.org` (Mailgun)
  - `smtp.gmail.com` (Gmail)
  - `smtp.sendgrid.net` (SendGrid)
  - `smtp.office365.com` (Microsoft 365)

**SMTP Port:**
- Usually **587** (TLS) or **465** (SSL)
- Check with your email provider

**Encryption:**
- **TLS**: Use with port 587 (recommended)
- **SSL**: Use with port 465

**Username:**
- Your email address
- Or SMTP username (if different)

**Password:**
- Your email password
- Or SMTP password/app password
- For Gmail: Use app-specific password

**From Name:**
- Name shown as sender
- Example: "SWELLEnterprise" or "Your Company Name"

**From Email:**
- Email address shown as sender
- Must match SMTP account (usually)

## Common Email Providers

### Gmail

**Settings:**
- **Host**: `smtp.gmail.com`
- **Port**: `587`
- **Encryption**: `TLS`
- **Username**: Your Gmail address
- **Password**: App-specific password (not regular password)

**Getting App Password:**
1. Go to Google Account → Security
2. Enable 2-Step Verification
3. Go to App Passwords
4. Generate password for "Mail"
5. Use this password in SWELL

### Microsoft 365 / Outlook

**Settings:**
- **Host**: `smtp.office365.com`
- **Port**: `587`
- **Encryption**: `TLS`
- **Username**: Your Office 365 email
- **Password**: Your Office 365 password

### Mailgun

**Settings:**
- **Host**: `smtp.mailgun.org`
- **Port**: `587`
- **Encryption**: `TLS`
- **Username**: Your Mailgun SMTP username
- **Password**: Your Mailgun SMTP password

**Getting Credentials:**
1. Go to Mailgun Dashboard
2. Navigate to Sending → Domain Settings
3. Find SMTP credentials
4. Copy username and password

### SendGrid

**Settings:**
- **Host**: `smtp.sendgrid.net`
- **Port**: `587`
- **Encryption**: `TLS`
- **Username**: `apikey` (literal text)
- **Password**: Your SendGrid API key

**Getting API Key:**
1. Go to SendGrid Dashboard
2. Settings → API Keys
3. Create API key
4. Copy key (use as password)

## Testing Your Configuration

### Test Connection

1. **Enter Settings**: Fill in all SMTP fields
2. **Click "Test Connection"**: Button in settings
3. **Check Result**: Success or error message
4. **Fix Issues**: If error, check settings

### Send Test Email

1. **Test Email Field**: Enter your email address
2. **Click "Send Test Email"**
3. **Check Inbox**: Look for test email
4. **Check Spam**: If not in inbox, check spam folder

### Verify Settings

**If Test Fails:**
- ✅ Check host is correct
- ✅ Verify port matches encryption
- ✅ Confirm username/password
- ✅ Check firewall isn't blocking
- ✅ Verify email provider allows SMTP

## Tenant-Wide vs User-Specific

### Tenant-Wide Settings

**Default SMTP:**
- Applies to all users in tenant
- Used for system emails
- Set in Settings → SMTP Settings
- All users can use

### User-Specific Settings

**Personal SMTP:**
- Individual user settings
- Override tenant settings
- Personal email sending
- Set in user profile (if available)

## Security Best Practices

1. **Use App Passwords**: Don't use main account password
2. **Keep Secure**: Don't share SMTP credentials
3. **Rotate Passwords**: Change passwords regularly
4. **Use TLS**: Prefer TLS over SSL
5. **Limit Access**: Only admins should configure

## Troubleshooting

**Test connection fails?**
- Verify host address is correct
- Check port number matches encryption
- Confirm username and password
- Check email provider allows SMTP access
- Verify firewall settings
- Try different port (587 vs 465)

**Test email not received?**
- Check spam/junk folder
- Verify email address is correct
- Check SMTP settings again
- Test with different email
- Check email provider logs

**Emails going to spam?**
- Configure SPF record
- Set up DKIM
- Use reputable email provider
- Avoid spam trigger words
- Warm up sending domain

**"Connection timeout" error?**
- Check internet connection
- Verify host address
- Check port is open
- Try different port
- Contact email provider

**"Authentication failed" error?**
- Verify username is correct
- Check password (use app password for Gmail)
- Confirm account is active
- Check if 2FA requires app password
- Verify SMTP is enabled for account

For more help, see [Common Issues](../troubleshooting/common-issues.md).

## Next Steps

- [Email Client](https://help.swellsystem.com/en/article/email-client-lfdw6t/) - Manage emails
- [Email Marketing](https://help.swellsystem.com/en/article/email-marketing-1mu3pbq/) - Send campaigns
- [Account Setup](../getting-started/account-setup.md) - Complete setup
