| 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 .jsv suffix or ?format=jsv
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: text/jsv
Content-Type: text/jsv
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: text/jsv
Content-Length: length
{
}