Articles in this section
Category / Section

Configuring a Custom Email Provider in The Wallet Crew with SendGrid

Published:
Updated:

Configuring a Custom Email Provider in The Wallet Crew

Article 1: Using The Wallet Crew’s SendGrid Account

Configuring The Wallet Crew to Use The Wallet Crew’s SendGrid Account

This guide will help you set up The Wallet Crew to use The Wallet Crew’s SendGrid account for sending emails.

Prerequisites

Before starting, ensure you have the following:

  • Access to your DNS settings.
  • Access to your Wallet Crew’s configuration files.

Step-by-Step Configuration

  1. Request Authorization:

    Contact The Wallet Crew support to request authorization for sending emails on your behalf. Provide your desired subdomain for security reasons. For example, use registration.yourdomain.com instead of yourdomain.com.

  2. Update DNS Settings:

    Update your DNS settings with the following records to authorize The Wallet Crew’s SendGrid account to send emails on your behalf. Below is an example configuration:

    type     | key                                       | value                                      | remarks
    ------------------------------------------------------------------------------------------------------
    CNAME    | em5094.registration.yourdomain.com        | u22547844.wl095.sendgrid.net               | used by SendGrid for domain validation
    CNAME    | neo._domainkey.registration.yourdomain.com| neo.domainkey.u22547844.wl095.sendgrid.net | used by SendGrid for DKIM authentication
    CNAME    | neo2._domainkey.registration.yourdomain.com| neo2.domainkey.u22547844.wl095.sendgrid.net| used by SendGrid for DKIM authentication
    TXT      | _dmarc.registration.yourdomain.com        | v=DMARC1; p=none;                          | DMARC configuration
    
  3. Update The Wallet Crew Configuration:

    Once DNS settings are updated, configure The Wallet Crew to use the provided subdomain for sending emails. Open your Wallet Crew’s configuration file and set the email provider section as follows:

    provider:
      type: sendgrid
      apiKey: # Wallet Crew's SendGrid API key will be used internally
      from:
        email: no-reply@registration.yourdomain.com
        name: yourcompany
    resources:
      - /locales/emails/
    
  4. Save and Test Configuration:

    Save your changes and test the email configuration by sending a test email from The Wallet Crew’s admin panel or test endpoint.

  5. Example Email Template:

    Place your email templates in the specified resources directory (/locales/emails/). Example structure:

    • /locales/emails/welcome_email.html
    • /locales/emails/reset_password.html

Security Note

For security reasons, authorizing The Wallet Crew to send emails only from a subdomain limits potential misuse. Ensure your main domain email sending is not affected.

Article 2: Using Your Own SendGrid Account

Configuring The Wallet Crew to Use Your Own SendGrid Account

This guide explains how to configure The Wallet Crew to use your own SendGrid account for sending emails.

Prerequisites

Before starting, ensure you have:

  • A SendGrid account.
  • An API key from SendGrid.
  • Access to your Wallet Crew configuration files.

Step-by-Step Configuration

  1. Obtain SendGrid API Key:

    • Log in to your SendGrid account.
    • Navigate to Settings > API Keys.
    • Click Create API Key.
    • Provide a name for your API key and select the appropriate permissions.
    • Click Create & View and copy the API key.
  2. Update The Wallet Crew Configuration:

    Open your Wallet Crew configuration file and update the email provider section with your SendGrid account details:

    provider:
      type: sendgrid
      apiKey: YOUR_SENDGRID_API_KEY
      from:
        email: contact@yourdomain.com
        name: yourcompany
    resources:
      - /locales/emails/
    

    Explanation:

    • type: Specifies the email provider. Set this to sendgrid.
    • apiKey: Your SendGrid API key.
    • from:
      • email: The email address that will appear as the sender.
      • name: The name that will appear as the sender.
    • resources: Path to the email templates used by The Wallet Crew.
  3. Save and Test Configuration:

    Save your changes and test the email configuration by sending a test email from The Wallet Crew’s admin panel or test endpoint.

  4. Example Email Template:

    Place your email templates in the specified resources directory (/locales/emails/). Example structure:

    • /locales/emails/welcome_email.html
    • /locales/emails/reset_password.html

Troubleshooting

If you encounter issues, consider the following steps:

  • Check API Key: Ensure the API key is correct and has the necessary permissions.
  • Logs: Review The Wallet Crew logs for any error messages related to email sending.
  • SendGrid Dashboard: Check the SendGrid dashboard for email activity and error messages.

Security Note

For security reasons, do not hard-code your API key directly into the configuration file in a production environment. Use environment variables or a secure secrets management service.

By following these steps, you can configure The Wallet Crew to send emails using either The Wallet Crew’s SendGrid account or your own SendGrid account effectively. For further assistance, refer to the The Wallet Crew and SendGrid documentation or contact their support teams.

Access denied
Access denied