Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
带附件的Python开放式电子邮件客户端_Python_Email_Attachment - Fatal编程技术网

带附件的Python开放式电子邮件客户端

带附件的Python开放式电子邮件客户端,python,email,attachment,Python,Email,Attachment,我正在尝试打开一个电子邮件客户端(如thunderbird)发送一封带有附件的电子邮件。我已尝试使用webbrowser.open('mailto:[…]?attachment=“path_to_file”)打开客户端,但没有附件。我还试着写file://path_to_file。 我在网上搜索了一个解决方案,但在那里我只找到了如何使用SMTP发送电子邮件的教程。你有什么想法吗?我会使用python配方,以一种便携、可靠的方式用python发送带有附件的邮件。你可以通过系统命令调用thunder

我正在尝试打开一个电子邮件客户端(如thunderbird)发送一封带有附件的电子邮件。我已尝试使用
webbrowser.open('mailto:[…]?attachment=“path_to_file”)
打开客户端,但没有附件。我还试着写
file://path_to_file

我在网上搜索了一个解决方案,但在那里我只找到了如何使用SMTP发送电子邮件的教程。你有什么想法吗?

我会使用python配方,以一种便携、可靠的方式用python发送带有附件的邮件。

你可以通过系统命令调用thunderbird来达到同样的效果

这是我开始的一条线。我得到了一个很好的答复:


谢谢您的快速回答。使用
pythont t.py-ma@g.com--附加=”file://home/aha/top.png“
正在打开一个客户端(thunderbird),但没有作为附件的文件。第286行中的mailto_字符串是:
mailto:a@g.com?attach=文件%3A%2F%2Fhome%2Faha%2Ftop.png
我做错了什么?