| Requires any of the roles: | Client, Admin, Partner |
| POST | /communication/sendmail | Sends an email |
|---|
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports digitaluapi.ServiceModel
Namespace Global
Namespace digitaluapi.ServiceModel
Public Partial Class Attachment
Public Overridable Property Content As String
Public Overridable Property Type As String
Public Overridable Property Filename As String
Public Overridable Property Disposition As String
Public Overridable Property ContentId As String
End Class
Public Partial Class AttachmentStream
Public Overridable Property Stream As Stream
Public Overridable Property Name As String
Public Overridable Property Type As String
Public Overridable Property Disposition As String
Public Overridable Property Contentid As String
End Class
Public Partial Class 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.")>
Public Overridable Property FromAddress As String
'''<Summary>
'''List of recipient email addresses
'''</Summary>
<ApiMember(Description:="List of recipient email addresses", IsRequired:=true)>
Public Overridable Property Recipients As IEnumerable(Of String)
'''<Summary>
'''Email subject
'''</Summary>
<ApiMember(Description:="Email subject", IsRequired:=true)>
Public Overridable Property Subject As String
'''<Summary>
'''Plain text body. Either this or HtmlBody is required
'''</Summary>
<ApiMember(Description:="Plain text body. Either this or HtmlBody is required")>
Public Overridable Property Body As String
'''<Summary>
'''Html body. Either this or Body is required
'''</Summary>
<ApiMember(Description:="Html body. Either this or Body is required")>
Public Overridable Property HtmlBody As String
'''<Summary>
'''Email attachments
'''</Summary>
<ApiMember(Description:="Email attachments")>
Public Overridable Property Attachments As String()
'''<Summary>
'''Email attachments
'''</Summary>
<ApiMember(Description:="Email attachments")>
Public Overridable Property AttachmentsObject As Attachment()
'''<Summary>
'''Attachment streams
'''</Summary>
<ApiMember(Description:="Attachment streams")>
Public Overridable Property AttachmentStreams As AttachmentStream()
'''<Summary>
'''Template substitutions
'''</Summary>
<ApiMember(Description:="Template substitutions")>
Public Overridable Property TemplateSubstitutions As Dictionary(Of String, String)
'''<Summary>
'''Template Id
'''</Summary>
<ApiMember(Description:="Template Id")>
Public Overridable Property TemplateId As String
'''<Summary>
'''List of BCC email addresses
'''</Summary>
<ApiMember(Description:="List of BCC email addresses")>
Public Overridable Property Bcc As IEnumerable(Of String)
'''<Summary>
'''List of CC email addresses
'''</Summary>
<ApiMember(Description:="List of CC email addresses")>
Public Overridable Property Cc As IEnumerable(Of String)
End Class
End Namespace
End Namespace
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=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
{
}