Setting Up SendGrid in a Play Environment
SendGrid’s integration with J1 Web is dependent on the sending/ receiving domain. For instance, if you send email from mail.school.edu, replies to that domain are forwarded to the J1 Web server. When you restore Production to Play, your Play environment will try to continue to use the Production configuration, thereby routing all emails you send from Play to the Production server. To mitigate this, you need to create a separate SendGrid configuration for your Play environment and ensure the Play environment settings get updated after each restore.
Requirements
Play server is available from the Internet in order to take full advantage of the integration
DNS records are configured for your play server
Options
SendGrid has webhook endpoints that collect statistical information about the emails you send and receive. The statistical endpoints (Mail Settings > Event Settings > Event Webhook) can only point to one server at a time.
Option 1: Use the same SendGrid account for Production and Play environments.
In this option, you will need to be careful not to change the integration settings in your Play environment. Doing so would cause SendGrid to communicate with your Play server instead of your Production when it comes to the statistical information being reported. It’s recommended that when you restore Production to Play that you use a database script to update the email domain your test environment should use.
update ProviderConfiguration set ProviderValue = '[your test subdomain here]' where ProviderAppID = -81 and ProviderKey = 'inboundDomain'
Option 2: Create a new SendGrid account to be used specifically for the Play environment.
In this option, you have the expense of two accounts, but there is less room for error. It is not required to use the SendGrid Pro plans in this option. They do have a Free tier, though it is severely limited.
Configuring SendGrid
Once you select the method you’d like to use from the options above, you need to setup a separate subdomain to send/ receive emails from for your test environment. In this example, we’ll use mailtest.school.edu.
In SendGrid, under Settings & Sender Authentication, begin the "Authenticate Your Domain" process. This walks you through configuring your test domain DNS records so you can deliver emails from your new test domain. This is the same process you followed when initially setting up Communications in a Production environment. You must also configure a new MX record for you mailtest.school.edu domain so that replies to your messages are relayed back to your test server.
See the Pre-Installation Guide for Communications on MyJenzabar.net for step-by-step instructions.