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/
精彩评论