SMTP 邮件发送库(仅支持 iOS)

函数:mail.send

函数功能:发送邮件

函数方法

a = mail.send("send@gmail.com", "receive@gmail.com", "Hello", "This is a test mail.", "smtp.gmail.com", "send@gmail.com", "*")

参数 类型 必填 说明
参数 1 string 发送者邮件地址
参数 2 string 接收者邮件地址
参数 3 string 邮件主题
参数 4 string 邮件正文
参数 5 string SMTP 服务器
参数 6 string SMTP 鉴定用户名
参数 7 string SMTP 鉴定密码
返回值 类型 说明
a boolean/string true - 发送成功,其它字符串为失败原因

函数用例

local mail = require "mail"
a = mail.send("i.82@82flex.com", "357722984@qq.com", "Hello", "This is a test mail.", "smtp.mxhichina.com", "i.82@82flex.com", "***")
if a == true then         --发送成功
    dialog("Succeed!", 0)
else
    dialog(a, 0)
end

注意事项

  • 点击 mail.so 进行下载,点击下载无反应,请鼠标右键点击在隐身窗口中打开链接并在打开链接后刷新网页。
  • iOS11 以下系统设备将 so 放入 /var/mobile/Media/TouchSprite/plugin 文件夹下。
  • iOS11 及其以上系统设备将 so 放入/ var/mobile/Media/TouchSprite/plugin_ios11 或者 usr/bin/tsplugin 文件夹下。
Copyright 北京帮你玩科技有限公司 2023 all right reserved,powered by Gitbook该文章修订时间: 2024-03-06 17:50:18

results matching ""

    No results matching ""