📮
Mailwind
  • 🚀Getting started
    • 👋Introduction
    • 🔗Add a provider
  • 📚Documentation
    • 🎨Tailwind configuration
    • 🔡Dynamic Expressions
    • 📱Responsive
  • API parameters
  • Sendgrid
    • Send an email
      • cURL
      • .NET
      • NodeJS
      • PHP
  • AWS SES
    • Obtain your credentials
    • Send an email
      • cURL
      • .NET
      • NodeJS
      • PHP
  • Resend
    • Send an email
      • cURL
      • .NET
      • NodeJS
      • PHP
Powered by GitBook
On this page
  1. Sendgrid
  2. Send an email

.NET

PreviouscURLNextNodeJS

Last updated 1 year ago

To make the HTTP request easier, we use for the example. Be free to use whatever you want

Find all parameters via this link:

var message = new
{
    layoutIdentifier = "<<YOUR_LAYOUT_ID>>",
    variables = new {},
    code = null,
    from = new
    {
        name = "Example User",
        email = "example@mailwind.io"
    },
    subject = "My first email",
    personalizations = new[]
    {
        new
        {
            to = new[]
            {
                new
                {
                    name = "Example User",
                    email = "example@mailwind.io"
                }
            }
        }
    }
};


RestClient client = new RestClient();
RestRequest request = new RestRequest("https://api.mailwind.io/v1/send/sendgrid/v3", Method.Post);
request.AddHeader("Authorization", $"Bearer <<YOUR_API_KEY_HERE>>");

request.AddJsonBody(msg, "application/json");

var response = client.Execute(request);
Restsharp
https://docs.sendgrid.com/api-reference/mail-send/mail-send