SendGrid Aptify Integration
VIDEO TRANSCRIPT | Recorded: 2022-01-27 | Verify against current system state
Abstract¶
Overview of SendGrid email system used for transactional emails from AANP. Explains the split between Real Magnet (marketing emails) and SendGrid (transactional/system emails). Covers key configuration areas: IP allowlisting for security, API keys per environment for tracing email origin, email activity search for membership team troubleshooting, link branding via links.aanp.org, and sender authentication DNS setup. Matt demonstrates the SendGrid .NET Core API integration for programmatic email sending.
Key Procedures¶
- Access SendGrid dashboard for configuration
- Add IP addresses to allowlist for SMTP/API access
- Create separate API keys per environment for traceability
- Search email activity by recipient email address
- View email delivery status, opens, and clicks
- Configure link branding domain (links.aanp.org)
- Set up sender authentication via MX and TXT DNS records
- Use SendGrid NuGet package for .NET Core integration
- Configure API key via environment variables in development
Notable Statements¶
- 0:00:58 "It's much more reliable to have two completely separate systems for transactional versus marketing emails."
- 0:01:57 "It's just using SendGrid as an SMTP relay server."
- 0:02:07 "SendGrid is really locked down... it's a great tool for developers versus Real Magnet which is really pushed toward a marketing team."
- 0:04:57 "Only the IP addresses listed here are allowed to send out emails from SMTP or through the API."
- 0:08:31 "Based on the API key ID we can tell where the email was generated from."
- 0:09:55 "Membership can go in here and type in somebody's email address and find out all of the emails that have been sent out to them."
- 0:11:24 "We were almost up to a million sometimes with the forums in there."
- 0:13:20 "The API is super easy to work with."
Systems & Configurations¶
Systems Mentioned¶
- SendGrid (transactional email)
- Real Magnet (marketing email)
- Aptify (uses SendGrid SMTP relay)
- .NET Core (API integration)
- Rackspace (WWW server)
- GitHub (code repository)
Specific Configurations¶
| Item | Value/Setting | Timestamp | Notes |
|---|---|---|---|
| Link Branding | links.aanp.org | 0:06:51 | Tracks link clicks |
| Mail Domain | aanp.org | 0:06:12 | Pass-through allowed |
| Monthly Requests | ~95,000 | 0:11:30 | Down from 1M with forums |
| API Keys | Per environment | 0:08:43 | Rackspace, production, QA |
| IP Allowlist | Web servers, Aptify | 0:05:51 | Required for sending |
Credentials/Access Mentioned¶
- SendGrid admin access
- API keys stored in environment variables
- Membership team has email activity search access
- Project team has search access
Errors & Troubleshooting¶
- Issue: Emails not sending from development
- Cause: Developer IP not in allowlist
- Resolution: Add IP address via access management or VPN
-
Timestamp: 0:05:27
-
Issue: Member claims email not received
- Cause: Various delivery issues
- Resolution: Search email activity by address, check delivery trail
- Timestamp: 0:09:43
Transcript Gaps & Quality Notes¶
- Training session with Matt and team
- Matt demonstrates .NET Core SendGrid API implementation
- SendGrid templates mentioned but not actively used yet
- Webhooks available but not implemented
- Discussion of environment variable configuration for API keys
- Could use templates in future for consistent email formatting