# Email Delivery Problems {#email-delivery-problems}


Troubleshoot email sending failures.


## Emails Not Sending {#emails-not-sending}


**Check SMTP configuration:**

```
MAIL_FROM_ADDRESS=noreply@example.com
MAIL_HOST=smtp.example.com
MAIL_PORT=587
MAIL_USERNAME=your-username
MAIL_PASSWORD=your-password
```


## Connection Timeout {#connection-timeout}


**Symptom:** `ECONNREFUSED` or `ETIMEDOUT`

**Fixes:**

1. Verify SMTP host and port
2. Check firewall rules allow outbound port 587/465
3. Try port 465 (SSL) vs 587 (TLS)


## Authentication Failed {#authentication-failed}


**Fixes:**

1. Check username/password
2. For Gmail: enable "Less secure app access" or use App Passwords
3. For Office 365: use OAuth2 app registration


## Custom SMTP Per Organization {#custom-smtp-per-organization}


Organizations can configure separate SMTP via **Settings** → **Custom SMTP**. See [Custom SMTP](https://sourcey-gauzy.pages.dev/features/custom-smtp/index.md).


## Testing Email {#testing-email}


Use a test service like [Mailtrap](https://mailtrap.io/) during development:

```
MAIL_HOST=sandbox.smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=your-mailtrap-user
MAIL_PASSWORD=your-mailtrap-pass
```


## Related Pages {#related-pages}


- [Email Template Endpoints](https://sourcey-gauzy.pages.dev/api/email-template-endpoints/index.md) — email API
- [Custom SMTP](https://sourcey-gauzy.pages.dev/features/custom-smtp/index.md) — per-org SMTP
