digitaluapi

<back to all web services

SendMailRequest

Requires Authentication
Requires any of the roles:Client, Admin, Partner
The following routes are available for this service:
POST/communication/sendmailSends an email
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*


open class SendMailRequest
{
    /**
    * 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.")
    open var FromAddress:String? = null

    /**
    * List of recipient email addresses
    */
    @ApiMember(Description="List of recipient email addresses", IsRequired=true)
    open var Recipients:ArrayList<String>? = null

    /**
    * Email subject
    */
    @ApiMember(Description="Email subject", IsRequired=true)
    open var Subject:String? = null

    /**
    * Plain text body. Either this or HtmlBody is required
    */
    @ApiMember(Description="Plain text body. Either this or HtmlBody is required")
    open var Body:String? = null

    /**
    * Html body. Either this or Body is required
    */
    @ApiMember(Description="Html body. Either this or Body is required")
    open var HtmlBody:String? = null

    /**
    * Email attachments
    */
    @ApiMember(Description="Email attachments")
    open var Attachments:ArrayList<String>? = null

    /**
    * Email attachments
    */
    @ApiMember(Description="Email attachments")
    open var AttachmentsObject:ArrayList<Attachment>? = null

    /**
    * Attachment streams
    */
    @ApiMember(Description="Attachment streams")
    open var AttachmentStreams:ArrayList<AttachmentStream>? = null

    /**
    * Template substitutions
    */
    @ApiMember(Description="Template substitutions")
    open var TemplateSubstitutions:HashMap<String,String>? = null

    /**
    * Template Id
    */
    @ApiMember(Description="Template Id")
    open var TemplateId:String? = null

    /**
    * List of BCC email addresses
    */
    @ApiMember(Description="List of BCC email addresses")
    open var Bcc:ArrayList<String>? = null

    /**
    * List of CC email addresses
    */
    @ApiMember(Description="List of CC email addresses")
    open var Cc:ArrayList<String>? = null
}

open class Attachment
{
    open var Content:String? = null
    open var Type:String? = null
    open var Filename:String? = null
    open var Disposition:String? = null
    open var ContentId:String? = null
}

open class AttachmentStream
{
    open var Stream:InputStream? = null
    open var Name:String? = null
    open var Type:String? = null
    open var Disposition:String? = null
    open var Contentid:String? = null
}

Kotlin SendMailRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

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/jsv
Content-Type: text/jsv
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/jsv
Content-Length: length

{
	
}