【问题标题】:How to send scheduled email via python app?如何通过 python 应用程序发送预定的电子邮件?
【发布时间】:2015-05-30 04:17:01
【问题描述】:

有没有办法通过 python 应用程序(Flask 或 Django)发送预定的电子邮件?到目前为止,我使用了 gmail 和 smtplib,但据我所知,在那里无法进行调度。还有其他(更好的)方法吗?

【问题讨论】:

标签: python django email flask smtp


【解决方案1】:

您需要一个专门用于此任务的进程。

一个常见的答案是使用 RabbitMQ 和 Celery,例如:https://simpleisbetterthancomplex.com/tutorial/2017/08/20/how-to-use-celery-with-django.html

您还可以使用其他队列,例如 Redis 队列:http://python-rq.org/ 和配套工具:https://github.com/ui/rq-scheduler 来获得类似 cron 的功能

【讨论】:

  • 请更新mathematism的链接,它只是显示图片
猜你喜欢
  • 1970-01-01
  • 2019-12-04
  • 1970-01-01
  • 1970-01-01
  • 2014-03-20
  • 2020-08-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多