| All Verbs | /sendmail/sendgrid/single |
|---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using sfgboxapi.ServiceInterface;
using SendGrid.Helpers.Mail;
namespace SendGrid.Helpers.Mail
{
public partial class EmailAddress
{
public virtual string Name { get; set; }
public virtual string Email { get; set; }
}
}
namespace sfgboxapi.ServiceInterface
{
public partial class SendGridSingleMailRequest
{
public virtual EmailAddress To { get; set; }
public virtual string Subject { get; set; }
public virtual string TemplateId { get; set; }
public virtual EmailAddress ReplyToEmail { get; set; }
public virtual EmailAddress FromEmail { get; set; }
public virtual string PlaintText { get; set; }
public virtual string HtmlText { get; set; }
public virtual string APIKey { get; set; }
}
}
C# SendGridSingleMailRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /sendmail/sendgrid/single HTTP/1.1
Host: sfgboxapi.dev.scadsoftware.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"to":{"name":"String","email":"String"},"subject":"String","templateId":"String","replyToEmail":{"name":"String","email":"String"},"fromEmail":{"name":"String","email":"String"},"plaintText":"String","htmlText":"String","apiKey":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{}