开发者

What is the simplest way to send an email with an attachment using Python?

开发者 https://www.devze.com 2023-02-23 04:21 出处:网络
What is the simplest way to send an email with an mp3 attachment using Python? I\'ve written scripts in the past which used a pipe to sendmail to send basic email messages, but I\'ve never bothered wi

What is the simplest way to send an email with an mp3 attachment using Python? 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 开发者_如何学Pythonbefore.

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.

Hope it helps.


You can also take a look at the python code used for: http://caspian.dotconf.net/menu/Software/SendEmail/

0

精彩评论

暂无评论...
验证码 换一张
取 消