How do I send attachments using SMTP?

后端 未结 6 895
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-01 01:55

I want to write a program that sends email using Python\'s smtplib. I searched through the document and the RFCs, but couldn\'t find anything related to attachments. Thus,

6条回答
  •  眼角桃花
    2020-12-01 02:04

    What you want to check out is the email module. It lets you build MIME-compliant messages that you then send with smtplib.

提交回复
热议问题