邮件API文档

邮件发送API文档

无需认证,直接调用的邮件发送接口

文件大小

2.5 MB

API概览

请求方法

POST

HTTP请求方法

必填参数

5个

必需填写的参数数量

支持类型

2种

plain 和 html 格式

API端点

https://email.uvqzu.cn/send_api.php

服务器配置

SMTP服务器

mail.uvqzu.cn

端口

25

安全连接

无加密

认证方式

邮箱密码认证

安全性

建议使用SSL/TLS

请求参数

参数名 类型 必需 说明
from string 必需 发件人邮箱地址
password string 必需 发件人邮箱密码
to string 必需 收件人邮箱,多个用逗号分隔
subject string 必需 邮件标题
content string 必需 邮件内容
type string 可选 邮件类型:plain(默认) 或 html

代码示例

cURL

curl -X POST \
  https://email.uvqzu.cn/send_api.php \
  -H 'Content-Type: application/json' \
  -d '{
  "from": "your_email@uvqzu.cn",
  "password": "your_password",
  "to": "recipient@example.com",
  "subject": "测试邮件",
  "content": "这是一封测试邮件"
}'

PHP

<?php
$url = 'https://email.uvqzu.cn/send_api.php';
$data = [
    'from' => 'your_email@uvqzu.cn',
    'password' => 'your_password',
    'to' => 'recipient@example.com',
    'subject' => '测试邮件',
    'content' => '这是一封测试邮件'
];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);

$response = curl_exec($ch);
curl_close($ch);

$result = json_decode($response, true);
print_r($result);
?>

在线测试