Mail Send
<h1>Mail send</h1>
<h5>Description</h5>
<ul>
<li>This interface is used to send mails individually or in batches</li>
</ul>
<h5>Request url</h5>
<ul>
<li><code>http://ip:port/api/v1/email/sendEmail</code></li>
</ul>
<h5>Request method</h5>
<ul>
<li>POST</li>
</ul>
<h5>Request example</h5>
<pre><code> http://ip:port/api/v1/email/sendEmail?account=***&amp;sign=***&amp;datetime=***
post body:{&quot;emails&quot;:&quot;123@163.com&quot;,&quot;theme&quot;:&quot;xxxxx&quot;,&quot;content&quot;:&quot;xxxxx&quot;}</code></pre>
<h5>Request body</h5>
<table>
<thead>
<tr>
<th style="text-align: left;">parameter</th>
<th style="text-align: left;">required</th>
<th style="text-align: left;">type</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">account</td>
<td style="text-align: left;">required</td>
<td style="text-align: left;">string</td>
<td>username</td>
</tr>
<tr>
<td style="text-align: left;">sign</td>
<td style="text-align: left;">required</td>
<td style="text-align: left;">string</td>
<td>MD5 signature (For details, see Interface Description. Sign Signature Generation Method)</td>
</tr>
<tr>
<td style="text-align: left;">datetime</td>
<td style="text-align: left;">required</td>
<td style="text-align: left;">string</td>
<td>GMT+8 current half-hour time in the format of time stamp</td>
</tr>
<tr>
<td style="text-align: left;">emails</td>
<td style="text-align: left;">required</td>
<td style="text-align: left;">string</td>
<td>Recipient email address. Multiple emails are separated by commas (,)</td>
</tr>
<tr>
<td style="text-align: left;">theme</td>
<td style="text-align: left;">required</td>
<td style="text-align: left;">string</td>
<td>Email subject</td>
</tr>
<tr>
<td style="text-align: left;">content</td>
<td style="text-align: left;">required</td>
<td style="text-align: left;">string</td>
<td>Email content</td>
</tr>
<tr>
<td style="text-align: left;">routing</td>
<td style="text-align: left;"></td>
<td style="text-align: left;">string</td>
<td>If you need to specify a channel, please contact the platform for requests</td>
</tr>
</tbody>
</table>
<h5>Responses</h5>
<pre><code> {
&quot;status&quot;: 0,
&quot;message&quot;: &quot;****&quot;,
&quot;data&quot;: [
&quot;success&quot;: &quot;2&quot;,
&quot;fail&quot;: &quot;0&quot;,
&quot;array&quot;: [
[123@163.com,48d5112288668ebb049dbb9034402910],
[456@163.com,c11d34242000e541f63fbdef3e36b1db]
]
]
}</code></pre>
<h5>Responses body</h5>
<table>
<thead>
<tr>
<th style="text-align: left;">parameter</th>
<th style="text-align: left;">type</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">status </td>
<td style="text-align: left;">int</td>
<td>3:Channel not found<br>2:send fail<br>1:success<br>0:Submitted successfully<br>-1:auth error<br>-2:IP access restriction<br>-3:Missing send field<br>-4:email subject is empty<br>-5:email content is empty<br>-7:Mail overload<br>-9:Recipient blank<br>-10:Insufficient account balance<br>-11:The timing time format is incorrect<br>-14:application was not found<br>-15:Request frequency too fast<br>-16:Out of time limit </td>
</tr>
<tr>
<td style="text-align: left;">message </td>
<td style="text-align: left;">string</td>
<td>Error message </td>
</tr>
<tr>
<td style="text-align: left;">data['success'] </td>
<td style="text-align: left;">int</td>
<td>Number of successful submissions </td>
</tr>
<tr>
<td style="text-align: left;">data['fail'] </td>
<td style="text-align: left;">int</td>
<td>Number of submission failures </td>
</tr>
<tr>
<td style="text-align: left;">data['array'] </td>
<td style="text-align: left;">Array</td>
<td>Array of successfully submitted mails. The array contains recipient and query ID of mail sending result, which are both strings </td>
</tr>
</tbody>
</table>