| Requires any of the roles: | Client, Admin, Partner |
| POST | /communication/sendmail | Sends an email |
|---|
export class Attachment
{
public Content: string;
public Type: string;
public Filename: string;
public Disposition: string;
public ContentId: string;
public constructor(init?: Partial<Attachment>) { (Object as any).assign(this, init); }
}
export class AttachmentStream
{
public Stream: string;
public Name: string;
public Type: string;
public Disposition: string;
public Contentid: string;
public constructor(init?: Partial<AttachmentStream>) { (Object as any).assign(this, init); }
}
export class SendMailRequest
{
/** @description Email address of sender. If it is not set the a default address will be used. */
// @ApiMember(Description="Email address of sender. If it is not set the a default address will be used.")
public FromAddress: string;
/** @description List of recipient email addresses */
// @ApiMember(Description="List of recipient email addresses", IsRequired=true)
public Recipients: string[];
/** @description Email subject */
// @ApiMember(Description="Email subject", IsRequired=true)
public Subject: string;
/** @description Plain text body. Either this or HtmlBody is required */
// @ApiMember(Description="Plain text body. Either this or HtmlBody is required")
public Body: string;
/** @description Html body. Either this or Body is required */
// @ApiMember(Description="Html body. Either this or Body is required")
public HtmlBody: string;
/** @description Email attachments */
// @ApiMember(Description="Email attachments")
public Attachments: string[];
/** @description Email attachments */
// @ApiMember(Description="Email attachments")
public AttachmentsObject: Attachment[];
/** @description Attachment streams */
// @ApiMember(Description="Attachment streams")
public AttachmentStreams: AttachmentStream[];
/** @description Template substitutions */
// @ApiMember(Description="Template substitutions")
public TemplateSubstitutions: { [index:string]: string; };
/** @description Template Id */
// @ApiMember(Description="Template Id")
public TemplateId: string;
/** @description List of BCC email addresses */
// @ApiMember(Description="List of BCC email addresses")
public Bcc: string[];
/** @description List of CC email addresses */
// @ApiMember(Description="List of CC email addresses")
public Cc: string[];
public constructor(init?: Partial<SendMailRequest>) { (Object as any).assign(this, init); }
}
TypeScript 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
{}