engagingnewsproject / misinfo-dashboard

2 stars 0 forks source link

Hook up Truth Sleuth to SendGrid (SMTP) #46

Open luukee opened 1 month ago

luukee commented 1 month ago

Steps to Set Up Firebase SMTP with SendGrid:

  1. Get Your SendGrid API Key:

    • Log in to your SendGrid account.
    • Navigate to SettingsAPI Keys.
    • Create a new API key (if you don’t have one) and store it securely.
  2. Enable Email Templates in Firebase Authentication:

    • Go to the Firebase Console.
    • Open your project.
    • Go to AuthenticationTemplates.
    • In this section, you’ll find the email templates Firebase uses (for email verification, password reset, etc.).
  3. Add SMTP Settings in Firebase Authentication:

    • In the Firebase Console, go to AuthenticationSettings.
    • Scroll down to the Email Templates section.
    • Click Customize action emailsSMTP to enable custom email sending via SMTP.
    • Enter the following details:

      • SMTP Host: smtp.sendgrid.net
      • Port: 587 (or 465 if you prefer SSL)
      • Username: apikey (yes, this is literal; you use apikey as the username)
      • Password: Your SendGrid API key
      • Sender Address: no-reply@mediaengagement.org (or any other email address from your domain you want to use for sending)

      Example setup:

      SMTP Host: smtp.sendgrid.net
      Port: 587
      Username: apikey
      Password: Your_SendGrid_API_Key
      Sender Address: no-reply@mediaengagement.com
  4. Save Changes:

    • After entering these details, save your changes.

Now Firebase will use SendGrid to send any authentication-related emails (like email verification, password reset, etc.) from no-reply@mediaengagement.com.