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
namespace digitaluapi.ServiceModel

open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type Attachment() = 
        member val Content:String = null with get,set
        member val Type:String = null with get,set
        member val Filename:String = null with get,set
        member val Disposition:String = null with get,set
        member val ContentId:String = null with get,set

    [<AllowNullLiteral>]
    type AttachmentStream() = 
        member val Stream:Stream = null with get,set
        member val Name:String = null with get,set
        member val Type:String = null with get,set
        member val Disposition:String = null with get,set
        member val Contentid:String = null with get,set

    [<AllowNullLiteral>]
    type SendMailRequest() = 
        ///<summary>
        ///Email address of sender. If it is not set the a default address will be used.
        ///</summary>
        [<ApiMember(Description="Email address of sender. If it is not set the a default address will be used.")>]
        member val FromAddress:String = null with get,set

        ///<summary>
        ///List of recipient email addresses
        ///</summary>
        [<ApiMember(Description="List of recipient email addresses", IsRequired=true)>]
        member val Recipients:IEnumerable<String> = null with get,set

        ///<summary>
        ///Email subject
        ///</summary>
        [<ApiMember(Description="Email subject", IsRequired=true)>]
        member val Subject:String = null with get,set

        ///<summary>
        ///Plain text body. Either this or HtmlBody is required
        ///</summary>
        [<ApiMember(Description="Plain text body. Either this or HtmlBody is required")>]
        member val Body:String = null with get,set

        ///<summary>
        ///Html body. Either this or Body is required
        ///</summary>
        [<ApiMember(Description="Html body. Either this or Body is required")>]
        member val HtmlBody:String = null with get,set

        ///<summary>
        ///Email attachments
        ///</summary>
        [<ApiMember(Description="Email attachments")>]
        member val Attachments:String[] = null with get,set

        ///<summary>
        ///Email attachments
        ///</summary>
        [<ApiMember(Description="Email attachments")>]
        member val AttachmentsObject:Attachment[] = null with get,set

        ///<summary>
        ///Attachment streams
        ///</summary>
        [<ApiMember(Description="Attachment streams")>]
        member val AttachmentStreams:AttachmentStream[] = null with get,set

        ///<summary>
        ///Template substitutions
        ///</summary>
        [<ApiMember(Description="Template substitutions")>]
        member val TemplateSubstitutions:Dictionary<String, String> = null with get,set

        ///<summary>
        ///Template Id
        ///</summary>
        [<ApiMember(Description="Template Id")>]
        member val TemplateId:String = null with get,set

        ///<summary>
        ///List of BCC email addresses
        ///</summary>
        [<ApiMember(Description="List of BCC email addresses")>]
        member val Bcc:IEnumerable<String> = null with get,set

        ///<summary>
        ///List of CC email addresses
        ///</summary>
        [<ApiMember(Description="List of CC email addresses")>]
        member val Cc:IEnumerable<String> = null with get,set

F# SendMailRequest DTOs

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

HTTP + 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

{}