A customer came up with an unusual requirement: they needed all reports from a survey sent by email. The survey involved 50,000 participants and 1,800 team managers.

To achieve this, I developed a console application that iterates through an Excel file containing email addresses and file IDs. The application retrieves the corresponding report from a folder containing PDF exports. Utilizing a dynamic template in SendGrid, it sends a request with the attachment to their Email API. The status is updated to “OK” next to the corresponding information in the Excel file. Email sending is divided over three days to avoid spam, and we also set up a custom domain with DMARC and SPF/DKIM for added security and deliverability assurance.

A notable feature is the ability for the console app to perform a dry run to verify email addresses and attachments. Additionally, a change in tactic involved promptly informing a colleague and requesting to handle the sending manually instead of waiting for investigation.

Snapshot from SendGrid

  • Requests: 1822
  • Delivered: 99.73%
  • Opened: +300.52%
  • Bounced: 6 (0.33%)

The console window for email-trucker.exe presenting a mode selection list.