excel - 从命令行发送电子邮件

标签 excel vba command-line thunderbird

我使用 Excel VBA 在 Thunderbird 中使用命令行参数创建电子邮件,可在此处找到: http://kb.mozillazine.org/Command_line_arguments_%28Thunderbird%29

可以写邮件,但如何自动发送?

或者,Thunderbird 中是否有一个按钮可以一次性发送所有撰写的电子邮件?

VBA 代码如下所示:

Option Explicit

Sub thunderbird()

Dim strTh As String
Dim strCommand As String

strTh = "C:\Program Files (x86)\Mozilla Thunderbird\thunderbird.exe "

strCommand = strCommand & " -compose " & "to=" & Chr(34) & "foo@bar.de" & Chr(34)
strCommand = strCommand & ",preselectid=id2"
strCommand = strCommand & ",subject=" & Chr(34) & "wow so email" & Chr(34)
strCommand = strCommand & ",body=" & Chr(34) & "anything" & Chr(10) & "more" & Chr(34)

Call Shell(strTh & strCommand, vbNormalFocus)

End Sub

最佳答案

不幸的是,这是不可能的。然而,https://support.mozilla.org/questions/1144493列出替代方案,以防它们适合您。

从 UI,文件 -> 发送未发送的消息应该可以(您可能需要激活菜单栏)来发送所有撰写的消息。

关于excel - 从命令行发送电子邮件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27367838/

相关文章:

excel - 您可以使用 Excel 宏自动将副本另存为 CSV 吗

c - Excel 文件、C 和痛苦

excel - 如何使用 Excel COUNTIF 计算通配符字符数?

VBA 无限循环

excel - 如果需要,用于检查和更改行的代码

excel - 如何将 Excel 工作簿中的所有现有对象列出到文本文件中?

.net - 用自定义 VBA 类包装 .Net ArrayList 获取迭代器

gcc - 如何指示 gcc/clang 将临时文件输出到特定目录

windows - 使用带引号逗号的 Windows 命令行 FOR 命令

unix - 简单的Unix重定向问题: Pass lines in a file as command line arguments to a script