Superface

Send Email

communication/send-email@2.1.0
4 providers

Send Email

Send transactional email to one recipient. Email can contain text and/or html representation.

Input
From
To
Subject
Text
HTML
Attachments
Result
Message Identifier

1.Choose a provider

2.Use SendEmail with sendgrid in your code

Login to see the code example

To show the integration code example you need to log in.

Structure details

Input (object)

from
The sender's email address.
to
The recipient's email address.
subject
The subject of your email. See character length requirements according to RFC 2822.
text
The plain text email message.
html
The HTML email message.
attachments
The email attachments.
content
The Base64 encoded content of the attachment.
type
The MIME type of the content you are attaching (e.g., “text/plain” or “text/html”).
filename
The attachment's filename.

Example

{
  "from": "no-reply@example.com",
  "to": "jane.doe@example.com",
  "subject": "Your order has been shipped!",
  "text": "Hello Jane, your recent order on Our Shop has been shipped.",
  "attachments": [
    {
      "filename": "order.pdf",
      "type": "application/pdf",
      "content": "JVBERi0xLjQKJeLjz9MKMyAwIG9..."
    }
  ]
}

Result (object)

messageId
The identifier is provider-specific and not unique.

Example

{
  "messageId": "JpITLjVBS3iknTzDq1BKPg"
}

Implementation details

Provider
sendgrid
Use case
SendEmail
Author
@superface
Source
Verified