POST api/Email/SendEmail/{templateId}?projectDetail_ID={projectDetail_ID}&projectItem_ID={projectItem_ID}&token={token}

Request Information

URI Parameters

NameDescriptionTypeAdditional information
templateId

integer

Required

projectDetail_ID

integer

Default value is -1

projectItem_ID

integer

Default value is -1

token

string

Default value is invalid

Body Parameters

EmailData
NameDescriptionTypeAdditional information
toAddress

string

None.

subject

string

None.

body

string

None.

lstReportData

Collection of ReportData

None.

lstAttachments

Collection of integer

None.

Request Formats

application/json, text/json

Sample:
{
  "toAddress": "sample string 1",
  "subject": "sample string 2",
  "body": "sample string 3",
  "lstReportData": [
    {
      "name": "sample string 1",
      "value": "sample string 2"
    },
    {
      "name": "sample string 1",
      "value": "sample string 2"
    }
  ],
  "lstAttachments": [
    1,
    2
  ]
}

text/html

Sample:
{"toAddress":"sample string 1","subject":"sample string 2","body":"sample string 3","lstReportData":[{"name":"sample string 1","value":"sample string 2"},{"name":"sample string 1","value":"sample string 2"}],"lstAttachments":[1,2]}

application/xml, text/xml

Sample:
<EmailController.EmailData xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API.Controllers">
  <body>sample string 3</body>
  <lstAttachments xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </lstAttachments>
  <lstReportData>
    <EmailController.ReportData>
      <name>sample string 1</name>
      <value>sample string 2</value>
    </EmailController.ReportData>
    <EmailController.ReportData>
      <name>sample string 1</name>
      <value>sample string 2</value>
    </EmailController.ReportData>
  </lstReportData>
  <subject>sample string 2</subject>
  <toAddress>sample string 1</toAddress>
</EmailController.EmailData>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

HttpResponseMessage
NameDescriptionTypeAdditional information
Version

Version

None.

Content

HttpContent

None.

StatusCode

HttpStatusCode

None.

ReasonPhrase

string

None.

Headers

Collection of Object

None.

RequestMessage

HttpRequestMessage

None.

IsSuccessStatusCode

boolean

None.