Step 1: Access Supabase Project Settings
To change SMTP settings in Supabase, you'll need to access your Supabase project settings first. Follow the steps below:
- Log in to your Supabase account at https://app.supabase.io.
- Once logged in, navigate to the dashboard and select your project.
- On your project overview page, click on the "Project Settings" option in the sidebar.
Step 2: Navigate to the Auth Settings
Now that you are in the project settings:
- Inside the project settings menu, look for and click on the "Authentication" section.
- Under this section, you will find various tabs like "Users", "Templates", and "Settings". Click on "Settings".
Step 3: Locate the SMTP Configuration
In the "Settings" tab under Authentication:
- Scroll down to find a subsection labeled "SMTP Settings". This is where you'll configure your SMTP settings for sending emails.
Step 4: Enter Your SMTP Settings
Enter your SMTP server details:
SMTP Host: smtp.your-email-provider.com
SMTP Port: 587
SMTP User: [email protected]
SMTP Password: your-email-password
Be sure to replace these placeholders with the actual details from your email service provider.
- SMTP Host: The server address of your SMTP provider.
- SMTP Port: The port number used for SMTP traffic, typically 465 for SSL or 587 for TLS.
- SMTP User: Your email address or username for the SMTP server.
- SMTP Password: Corresponding password for the user's email address.
Step 5: Set the From Email Address
- Within the same "SMTP Settings" section, you might need to set a "From email" address. This email will appear as the sender email when your application sends out emails. Enter a verified email address that you intend to use as the sender.
Step 6: Configure Additional Email Options
Some providers allow for additional SMTP configurations such as securing the connection with TLS/SSL or defining additional headers. If applicable:
- Set the "Secure" setting to true for SSL/TLS connections or false for unsecured ones.
- Consult your SMTP provider's documentation for any additional settings.
Here's an example configuration if additional settings are needed:
Secure: true
Require TLS: true
Step 7: Save the Changes
- After entering all the necessary details, ensure that you click on the "Save" button to apply the changes.
- Your Supabase project should now be configured to send emails using the specified SMTP server.
Step 8: Test the SMTP Configuration
To ensure that your SMTP settings are correct:
- Trigger an authentication-related email event, such as a password reset or sign-up email, to verify if your application correctly sends an email.
- Check both the Supabase logs and your email server logs to verify successful email dispatch.
Step 9: Troubleshoot Any Issues
If you encounter issues with your email delivery:
- Double-check the SMTP settings you entered for any inaccuracies.
- Ensure that your SMTP credentials are correct and the server is not blocking connections.
- If email delivery fails, consult your email provider's documentation for possible issues such as IP whitelisting or account restrictions.