简体   繁体   English

使用Python发送带有附件的电子邮件的最简单方法是什么?

[英]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.

相关问题 使用 python 3.7.3 发送带附件的 email - Send email with attachment using python 3.7.3 Python发送带有附件的电子邮件 - Python send email with an attachment 使用 Python 进行 SSH 的最简单方法是什么? - What is the simplest way to SSH using Python? 有没有办法用 dataframe 附件发送 email? - Is there a way to send email with a dataframe attachment? 使用python在Outlook电子邮件中发送附件的正确语法是什么? - What is the correct syntax to send attachment in outlook email with python? 使用Python和Gmail作为提供商发送电子邮件的安全方式是什么? - What is a secure way to send an email using Python and Gmail as the provider? 如何使用python发送gpg加密电子邮件(带附件) - How to send gpg encrypted email (with attachment) using python 使用python在内存中解压缩电子邮件附件,然后在发布请求中发送它 - Unzip email attachment in memory using python and then send it in a post request 如何将 Excel 作为 email 中的附件发送 Python 3.6.8 - How to send Excel as an attachment in email Using mandrill with Python 3.6.8 如何发送 pandas dataframe 作为 email 附件在 Z23EEEB4347BDD26BDD5FC6B7EE9A3B7 使用交换库 - how to send pandas dataframe as an email attachment in python using exchangelib
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM