Overview
Auth0 can send emails through:- Built-in Auth0 email provider (default)
- Custom SMTP providers
- Third-party email services (SendGrid, Mailgun, Mandrill, etc.)
Get Email Provider
Retrieves details of the email provider configuration.Context for the request
Query parameters:
Fields- Fields to include or excludeIncludeFields- Whether to include or exclude fields
Optional request options
Returns the email provider with properties:
Name- Provider name (e.g., “smtp”, “sendgrid”, “mailgun”)Enabled- Whether the provider is enabledDefaultFromAddress- Default from addressCredentials- Provider credentials (redacted)Settings- Provider-specific settings
Example
Create Email Provider
Configures a new email provider.Context for the request
The email provider configuration:
Name- Provider name (required)Enabled- Whether to enable the providerDefaultFromAddress- Default from addressCredentials- Provider credentialsSettings- Provider-specific settings
Optional request options
Example: SendGrid Provider
Example: SMTP Provider
Example: Mailgun Provider
Update Email Provider
Updates the email provider configuration.Context for the request
The fields to update
Optional request options
Example
Delete Email Provider
Deletes the email provider configuration, reverting to the default Auth0 email provider.Context for the request
Optional request options
Example
Supported Email Providers
SendGrid
Requires:api_key- SendGrid API key
Mailgun
Requires:api_key- Mailgun API keydomain- Mailgun domainregion- “us” or “eu” (optional)
Mandrill
Requires:api_key- Mandrill API key
Amazon SES
Requires:accessKeyId- AWS access key IDsecretAccessKey- AWS secret access keyregion- AWS region
SparkPost
Requires:api_key- SparkPost API keyregion- “us” or “eu” (optional)
SMTP
Requires:smtp_host- SMTP server hostnamesmtp_port- SMTP server portsmtp_user- SMTP usernamesmtp_pass- SMTP password
Complete Example
Best Practices
- Use Dedicated Email Service - Configure a reliable third-party email provider for production
- Verify Domain - Ensure your from address domain is verified with your email provider
- Test Configuration - Send test emails after configuring a provider
- Monitor Delivery - Track email delivery rates and bounces
- Secure Credentials - Store API keys and credentials securely
- Configure SPF/DKIM - Set up proper email authentication to improve deliverability
Related Resources
- Email Templates - Customize email templates
- Branding - Customize email appearance
- Custom Domains - Use custom domains in emails
- Email Provider Setup Guide