Python:打开Thunderbird以附加文件写入新邮件 [英] Python: Open Thunderbird to write new mail with attached file

查看:213
本文介绍了Python:打开Thunderbird以附加文件写入新邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Debian和Windows上打开Thunderbird,附带一封新的电子邮件。

I would like to open Thunderbird on Debian AND Windows with an attached file for a new email.

所以我想和这个线程一样,但是发布的解决方案不起作用:

So I would like to do the same as in this thread but the posted solution does not work:

Python打开电子邮件客户端附件

我有与user2686223相同的问题。该文件将不会附加到邮件。任何人都可以帮助我吗?

I have the very same problem as user2686223. The file will not be attached to the mail. Can anyone help me with this?

可能还有另一个解决方案?

Maybe with another solution?

编辑:这是现在如何工作:

This is now how it works:

import os
os.system("thunderbird -compose to='test@test.de',subject='subject',body='body',attachment='/path/to/file'")


推荐答案

使用命令行参数-compose启动Thunderbird。
有关 http://kb.mozillazine.org/Command_line_arguments_%28Thunderbird%29的更多信息

Start Thunderbird with the command line argument "-compose". More about it at http://kb.mozillazine.org/Command_line_arguments_%28Thunderbird%29

这篇关于Python:打开Thunderbird以附加文件写入新邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆