QQ邮箱SMTP发信API使用教程-已更新-PHP板块造梦空间论坛-技术交流-造梦空间论坛

QQ邮箱SMTP发信API使用教程-已更新

  1. 首先点击→登录QQ邮箱
  2. 然后登录之后点击设置→账号

    352472625a144336

    可能有些人是这样的:

    4172449e7c144852

  3. 反正最终目的都是找到这个SMTP服务,开启复制授权码

    4f94c38e62145055有自己服务器的可以直接从第七步开始看

  4. 我这边拿我们的云主机做演示产品与服务→云主机→操作→登录面板

    681b8352ba150915

  5. 如果没有域名也可以在里面免费领取一个

    c7524e2bad152133

  6. 然后进入数据管理→在线文件管理建一个php文件

    8f0a46fea9152240

  7. 里面建一个php文件,里面写入以下内容

    <?php
    $use="发信邮箱";
    $name="发信名字";
    $pass="刚刚复制的授权码";
    $tom="收件人邮箱";
    $toname="收件人名字";
    $title="标题";
    $html='内容';
    // 构建 GET 请求的参数
    $parameters = [
    'use' => $use,
    'name' => $name,
    'pass' => $pass,
    'tom' => $tom,
    'toname' => $toname,
    'title' => $title,
    'html' => $html,
    ];
    // 构建请求 URL
    $url = 'https://blog.zmkj.cn/api/email/index.php?' . http_build_query($parameters);
    // 发送 GET 请求
    $response = file_get_contents($url);
    // 处理响应结果
    if ($response === false) {
    echo "请求失败";
    } else {
    echo $response;
    }
    <?php
    $use="发信邮箱";
    $name="发信名字";
    $pass="刚刚复制的授权码";
    $tom="收件人邮箱";
    $toname="收件人名字";
    $title="标题";
    $html='内容';
    
    
    // 构建 GET 请求的参数
    $parameters = [
        'use' => $use,
        'name' => $name,
        'pass' => $pass,
        'tom' => $tom,
        'toname' => $toname,
        'title' => $title,
        'html' => $html,
    ];
    
    // 构建请求 URL
    $url = 'https://blog.zmkj.cn/api/email/index.php?' . http_build_query($parameters);
    
    // 发送 GET 请求
    $response = file_get_contents($url);
    
    // 处理响应结果
    if ($response === false) {
        echo "请求失败";
    } else {
        echo $response;
    }
    <?php $use="发信邮箱"; $name="发信名字"; $pass="刚刚复制的授权码"; $tom="收件人邮箱"; $toname="收件人名字"; $title="标题"; $html='内容'; // 构建 GET 请求的参数 $parameters = [ 'use' => $use, 'name' => $name, 'pass' => $pass, 'tom' => $tom, 'toname' => $toname, 'title' => $title, 'html' => $html, ]; // 构建请求 URL $url = 'https://blog.zmkj.cn/api/email/index.php?' . http_build_query($parameters); // 发送 GET 请求 $response = file_get_contents($url); // 处理响应结果 if ($response === false) { echo "请求失败"; } else { echo $response; }
  8.  然后把对应的信息填进去就行了。
  9. 然后服务刚刚申请的域名后面加上/你php文件名字,就能发送成功了。

    37b1684556153142

请登录后发表评论

    没有回复内容

© 造梦空间论坛
❤富强❤