IntegrationsEmails

PullTheCode usesSendGrid

SendGrid is free for up to 100 emails per day and it's very easy to configure.

Setup Sendgrid

  • Visitsendgrid.comand create your account. You will be asked to use your business email address to verify your account and to set up a 2FA.
  • Once you have access to the dashboard, click [Settings +] > [API Keys] > [Create API Key]. You will be shown your SendGrid secret, keep the popup open and go to the next step.
  • Rename .env.example to .env if you didn't do it yet.
  • Open the file .env and set the variable SENDGRID_API_KEYwith the secret shown in the previous step.
  • Now, from the main sidebar, go to [Email API +] > [Dynamic Templates] > [Create a Dynamic Template]. The process of creating a template is very simple and you will be using a drag and drop interface. I usually create at least 2 emails: one for the newsletter, and one for the new customers.
  • Your new email template should be visible in the list. Click on it and copy the ID from the URL.
  • Open the file /lib/EmailTemplatesIds and configure the EmailTemplatesIdsenum with the IDs of your templates.
  • That's it! You are ready to send emails through your new application! You can find the helpers in the /src/app/services/sendgrid/index.ts file.