[英]What is the simplest way to send an email with an attachment using Python?
What is the simplest way to send an email with an mp3 attachment using Python? 使用Python发送带有mp3附件的电子邮件的最简单方法是什么? I've written scripts in the past which used a pipe to sendmail to send basic email messages, but I've never bothered with attachments before.
我过去编写过脚本,该脚本使用管道发送邮件来发送基本的电子邮件,但是我以前从不打扰附件。
Thanks in advance. 提前致谢。
Use email package . 使用电子邮件包 。 It's pretty simple.
这很简单。
In the URL I linked, you'll find straight examples on how to do just that. 在我链接的URL中,您将找到有关如何做到这一点的直接示例。
Hope it helps. 希望能帮助到你。
您还可以查看用于以下方面的python代码: http : //caspian.dotconf.net/menu/Software/SendEmail/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.