Sending mail via sendmail from python

前端 未结 8 1652
时光说笑
时光说笑 2020-12-04 12:04

If I want to send mail not via SMTP, but rather via sendmail, is there a library for python that encapsulates this process?

Better yet, is there a good library that

8条回答
  •  北荒
    北荒 (楼主)
    2020-12-04 12:32

    The easiest answer is the smtplib, you can find docs on it here.

    All you need to do is configure your local sendmail to accept connection from localhost, which it probably already does by default. Sure, you're still using SMTP for the transfer, but it's the local sendmail, which is basically the same as using the commandline tool.

提交回复
热议问题