You are viewing a section of Superface that will be deprecated in Q4 2023. Until then, you can continue to use it as you have before but we recommend that you migrate to our latest version soon. For more details visit superface.ai/docs/migrate.

Send Email

communication/send-email@2.2.0
3 providers

Send Email

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

Input
From
To
Subject
Text
HTML
Reply-To
Attachments
Result
Message Identifier

1.Choose a provider

2.Use SendEmail with mock in your code

Below instructions are for our Node.js SDK. Use OneService for other languages.
npm i @superfaceai/one-sdk

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.
replyTo
The Reply-To email address.
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

Result (object)

messageId
The identifier is provider-specific and not unique.

Example

Implementation details

Provider
mock
Use case
SendEmail
Author
@superface
Source
Verified