Home / Companies / Twilio / Blog / Post Details
Content Deep Dive

Send Recurring Emails using C# .NET and Hangfire with SendGrid

Blog post from Twilio

Post Details
Company
Date Published
Author
Similoluwa Adegoke
Word Count
2,310
Language
English
Hacker News Points
-
Summary

A .NET application is created to run recurring jobs using Hangfire, a framework for managing background jobs. The application integrates with SendGrid, a cloud-based email service, to send emails at specified intervals. The application uses the `RecurringJob.AddOrUpdate` method to schedule a job to be triggered every 15 seconds, and the `EmailJob` class is created to handle sending an email in the job. The `SendGridClient` is used to send emails to the desired recipient using SendGrid's API. The application is run with the command `dotnet run`, and the result is a recurring email sent to the recipient at specified intervals.