POST api/Mail/Send

发送邮件,不带附件

Request Information

URI Parameters

None.

Body Parameters

MailRequest
NameDescriptionTypeAdditional information
ToAddress

Collection of string

None.

CC

Collection of string

None.

Subject

string

None.

HtmlBody

string

None.

Request Formats

application/json, text/json

Sample:
{
  "ToAddress": [
    "sample string 1",
    "sample string 2"
  ],
  "CC": [
    "sample string 1",
    "sample string 2"
  ],
  "Subject": "sample string 1",
  "HtmlBody": "sample string 2"
}

application/xml, text/xml

Sample:
<MailRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Yidu.Model.TO.Request">
  <CC xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </CC>
  <HtmlBody>sample string 2</HtmlBody>
  <Subject>sample string 1</Subject>
  <ToAddress xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </ToAddress>
</MailRequest>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

ApiResultOfCommonResponse
NameDescriptionTypeAdditional information
Code

ApiCode

None.

Message

string

None.

Body

CommonResponse

None.

IsSuccess

boolean

None.

SubCode

SubCode

None.

SubMessage

string

None.

Response Formats

application/json, text/json

Sample:
{
  "Code": 0,
  "Message": "sample string 1",
  "Body": {},
  "IsSuccess": true,
  "SubCode": 0,
  "SubMessage": "sample string 2"
}

application/xml, text/xml

Sample:
<ApiResultOfCommonResponserUIxL1Kj xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Yidu.Model.TO">
  <Body xmlns:d2p1="http://schemas.datacontract.org/2004/07/Yidu.Model.TO.Response" />
  <Code>Success</Code>
  <Message>sample string 1</Message>
  <SubCode>Success</SubCode>
  <SubMessage>sample string 2</SubMessage>
</ApiResultOfCommonResponserUIxL1Kj>