栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

使用curl发送电子邮件

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

使用curl发送电子邮件

curl –url 'smtps://smtp.gmail.com:465’ –ssl-reqd
–mail-from 'username@gmail.com‘ –mail-rcpt 'john@example.com‘
–upload-file mail.txt –user 'username@gmail.com:password’ –insecure

mail.txt 文件内容:

From: "User Name" <username@gmail.com>To: "John Smith" <john@example.com>Subject: This is a testHi John,I’m sending this mail with curl thru my gmail account.Bye!

附加信息:

  1. 我正在使用

    curl
    带有SSL支持的7.21.6版本。

  2. --insecure
    交换机允许
    curl
    执行“不安全”的SSL连接和传输。有关更多详细信息,请参见此在线资源。

  3. 通过命令行参数传递帐户凭据被认为是不安全的做法。上面的示例仅用于演示目的。

  4. 您必须打开安全性较低的应用程序的访问权限。



转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/394161.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号