有些人会问为什么要有这个,QQ/163邮箱会在发信时记录你的IP给别人,如果你套了CDN,就也是被溯源的一个最简单的方法
本接口未启用接口限速
点击文字展开说明
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| apikey | string | yes | API密钥,注册账号免费获取 |
| smtp | string | yes | SMTP地址 |
| port | string | no | 端口,可选587/465 |
| user | string | yes | 发信邮箱 |
| pwd | string | yes | 授权码 |
| to | string | yes | 收件人邮箱(多个用“,”区分) |
| title | string | yes | 邮件标题 |
| sendname | string | yes | 发件人名称 |
| sendcontent | string | yes | 发件正文内容(支持HTML) |
| content_type | string | no | 默认自动检测,用于区分content类型,可选plain(纯文本)/html(HTML) |
点击文字展开说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| code | string | 状态码,200成功 |
| msg | string | 状态信息 |
| time | string | 发信时间 |
结果将显示在这里
<?php
$url = 'https://api.xiaoyu17.cn/API/smtp.php';
$params = [
'apikey' => 'API密钥,注册账号免费获取',
'smtp' => 'SMTP地址',
'port' => '端口,可选587/465',
'user' => '发信邮箱',
'pwd' => '授权码',
'to' => '收件人邮箱(多个用“,”区分)',
'title' => '邮件标题',
'sendname' => '发件人名称',
'sendcontent' => '发件正文内容(支持HTML)',
'content_type' => '默认自动检测,用于区分content类型,可选plain(纯文本)/html(HTML)',
];
$url .= '?' . http_build_query($params);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
import requests
url = "https://api.xiaoyu17.cn/API/smtp.php"
params = {
"apikey": "API密钥,注册账号免费获取",
"smtp": "SMTP地址",
"port": "端口,可选587/465",
"user": "发信邮箱",
"pwd": "授权码",
"to": "收件人邮箱(多个用“,”区分)",
"title": "邮件标题",
"sendname": "发件人名称",
"sendcontent": "发件正文内容(支持HTML)",
"content_type": "默认自动检测,用于区分content类型,可选plain(纯文本)/html(HTML)",
}
response = requests.get(url, params=params)
print(response.text)
const url = new URL('https://api.xiaoyu17.cn/API/smtp.php');
const params = {
'apikey': 'API密钥,注册账号免费获取',
'smtp': 'SMTP地址',
'port': '端口,可选587/465',
'user': '发信邮箱',
'pwd': '授权码',
'to': '收件人邮箱(多个用“,”区分)',
'title': '邮件标题',
'sendname': '发件人名称',
'sendcontent': '发件正文内容(支持HTML)',
'content_type': '默认自动检测,用于区分content类型,可选plain(纯文本)/html(HTML)',
};
Object.keys(params).forEach(key => {
url.searchParams.append(key, params[key]);
});
fetch(url)
.then(response => response.text())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));