Start Me
Pasta
累计调用:97504
自定义邮箱发信
GET自定义你的邮箱账号和发信服务器 在线给你托管发信
接口地址:
https://api.qster.top/API/v1/cumail
接口示例:
https://api.qster.top/API/v1/cumail/?name=客源API&adress=&title=标题&content=内容&host=mail.pissmail.com&port=465&username=keyuan@pissmail.com&password=123456&html=true&htmltitle=&template=1&logo=图标logo
请求参数
参数名 | 类型 | 必填 | 说明 |
---|---|---|---|
adress | string | 是 | 对方邮箱地址 |
title | string | 是 | 标题 |
content | string | 是 | 发送内容 |
host | string | 是 | 发信地址 |
port | string | 是 | 发信端口 如465 |
username | string | 是 | 账号名称 |
password | string | 是 | 账号密码 是授权码,不是登录密码 |
html | string | 否 | false为文本格式发信 true为网页格式发信 |
template | string | 否 | 网页格式模板 为数字 |
logo | string | 否 | 网页格式发信时,所带的图片logo |
htmltitle | string | 否 | 网页发信的页面标题 |
name | string | 是 | 发信人的名称 |
qskey | string | 否 | 申请临时密钥 |
响应参数
参数 | 说明 |
---|---|
msg | 响应说明 |
code | 200正常400失败 查看更多 |
代码示例
<?php
// 要调用的 URL
$url = "https://api.qster.top/API/v1/cumail";
// 参数数组
$params = [
"adress" => "对方邮箱地址",
"title" => "标题",
"content" => "发送内容",
"host" => "发信地址",
"port" => "发信端口 如465",
"username" => "账号名称",
"password" => "账号密码 是授权码,不是登录密码",
"html" => "false为文本格式发信 true为网页格式发信",
"template" => "网页格式模板 为数字",
"logo" => "网页格式发信时,所带的图片logo",
"htmltitle" => "网页发信的页面标题",
"name" => "发信人的名称",
"qskey" => "0",
];
// 使用 http_build_query 将参数转换为查询字符串
$queryString = http_build_query($params);
// 在 URL 中添加查询字符串
$finalUrl = $url . '?' . $queryString;
// 使用 file_get_contents 获取内容
$response = file_get_contents($finalUrl);
// 输出响应
echo $response;
?>
import requests
url = "https://api.qster.top/API/v1/cumail";
params = {
"adress" : "对方邮箱地址",
"title" : "标题",
"content" : "发送内容",
"host" : "发信地址",
"port" : "发信端口 如465",
"username" : "账号名称",
"password" : "账号密码 是授权码,不是登录密码",
"html" : "false为文本格式发信 true为网页格式发信",
"template" : "网页格式模板 为数字",
"logo" : "网页格式发信时,所带的图片logo",
"htmltitle" : "网页发信的页面标题",
"name" : "发信人的名称",
"qskey" => "0"
}
response = requests.get(url, params=params)
print(response.text)
function fetchData(url, params) {
const queryString = Object.keys(params)
.map(key => `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`)
.join('&');
const fullUrl = `${url}?${queryString}`;
fetch(fullUrl)
.then(response => response.text())
.then(data => {
const resultElement = document.createElement('pre');
resultElement.textContent = data;
document.body.appendChild(resultElement);
})
.catch(error => console.error('Error fetching data:', error));
}
// 示例用法
const url = "https://api.qster.top/API/v1/cumail";
const params = {
"adress" : "对方邮箱地址",
"title" : "标题",
"content" : "发送内容",
"host" : "发信地址",
"port" : "发信端口 如465",
"username" : "账号名称",
"password" : "账号密码 是授权码,不是登录密码",
"html" : "false为文本格式发信 true为网页格式发信",
"template" : "网页格式模板 为数字",
"logo" : "网页格式发信时,所带的图片logo",
"htmltitle" : "网页发信的页面标题",
"name" : "发信人的名称",
"qskey" => "0"
};
fetchData(url, params);