如何从命令行在 Thunderbird 中撰写和发送电子邮件?

Yur*_*rij 6 ubuntu thunderbird command-line-interface

我使用此命令发送带有 Thunderbird 的日志文件

thunderbird -compose "subject='test',to='test@mail.test',body=$output,attachment='/home/test/scan.log'"
Run Code Online (Sandbox Code Playgroud)

启动并显示雷鸟预填充的编辑消息窗口,我必须手动按下发送按钮 如何自动发送电子邮件?截图雷鸟

小智 2

Thunderbird 不支持使用命令行自动发送电子邮件(即非交互方式)。这个问题在这里得到了解答 - https://support.mozilla.org/en-US/questions/1144493

它建议您直接与相关的 SMTP 服务器通信,而不是使用 Thunderbird 等邮件客户端。

可能使用 PHP - http://www.inmotionhosting.com/support/website/sending-email-from-site/using-the-php-mail-function-to-send-emails

  • 如果您使用命令行,那么使用“sendmail”可能比修改 PHP 或 JavaScript 更好。 (2认同)