首页 > 解决方案 > 使用 Outlook 电子邮件时 git send-email 出现“发送邮件需要 STARTTLS”错误

问题描述

我正在使用 ubuntu 20.04,最初,我没有git send-email作为有效命令。我安装git-email然后git send-email开始工作。

我有以下配置文件:

[sendemail]
    # smtpuser = <myemail@outlook.com>
    from = My Name <myemail@outlook.com>
    smtpserver = smtp.office365.com
    smtpencryption = STARTTLS
    smtpserverport = 587

当我运行git send-email --to <myemail@outlook.com> patches/*.patch测试它并将相应的补丁发送到我的电子邮件时,我得到以下输出:

5.7.3 STARTTLS is required to send mail [ZR0P278CA0106.CHEP278.PROD.OUTLOOK.COM]

我从我的电子邮件设置中获得了 Outlook 网站的 SMTP 服务器、加密方法和服务器端口。

PS:我已经smtpuser注释掉了,因为我得到了一个通过这个答案解决的错误,通过删除该smtpuser字段。

标签: gitemail

解决方案


推荐阅读