| Requires any of the roles: | Client, Admin, Partner |
| POST | /communication/sendmail | Sends an email |
|---|
"use strict";
export class Attachment {
/** @param {{Content?:string,Type?:string,Filename?:string,Disposition?:string,ContentId?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Content;
/** @type {string} */
Type;
/** @type {string} */
Filename;
/** @type {string} */
Disposition;
/** @type {string} */
ContentId;
}
export class AttachmentStream {
/** @param {{Stream?:string,Name?:string,Type?:string,Disposition?:string,Contentid?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Stream;
/** @type {string} */
Name;
/** @type {string} */
Type;
/** @type {string} */
Disposition;
/** @type {string} */
Contentid;
}
export class SendMailRequest {
/** @param {{FromAddress?:string,Recipients?:string[],Subject?:string,Body?:string,HtmlBody?:string,Attachments?:string[],AttachmentsObject?:Attachment[],AttachmentStreams?:AttachmentStream[],TemplateSubstitutions?:{ [index:string]: string; },TemplateId?:string,Bcc?:string[],Cc?:string[]}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Email address of sender. If it is not set the a default address will be used. */
FromAddress;
/**
* @type {string[]}
* @description List of recipient email addresses */
Recipients;
/**
* @type {string}
* @description Email subject */
Subject;
/**
* @type {string}
* @description Plain text body. Either this or HtmlBody is required */
Body;
/**
* @type {string}
* @description Html body. Either this or Body is required */
HtmlBody;
/**
* @type {string[]}
* @description Email attachments */
Attachments;
/**
* @type {Attachment[]}
* @description Email attachments */
AttachmentsObject;
/**
* @type {AttachmentStream[]}
* @description Attachment streams */
AttachmentStreams;
/**
* @type {{ [index:string]: string; }}
* @description Template substitutions */
TemplateSubstitutions;
/**
* @type {string}
* @description Template Id */
TemplateId;
/**
* @type {string[]}
* @description List of BCC email addresses */
Bcc;
/**
* @type {string[]}
* @description List of CC email addresses */
Cc;
}
JavaScript SendMailRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /communication/sendmail HTTP/1.1
Host: duengageapi.uat.scadsoftware.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"FromAddress":"String","Subject":"String","Body":"String","HtmlBody":"String","Attachments":["String"],"AttachmentsObject":[{"Content":"String","Type":"String","Filename":"String","Disposition":"String","ContentId":"String"}],"AttachmentStreams":[{"Name":"String","Type":"String","Disposition":"String","Contentid":"String"}],"TemplateSubstitutions":{"String":"String"},"TemplateId":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{}