目前,Scrapy Spidermon扩展仅显示使用Amazon Simple Email Service发送电子邮件的示例。是否可以使用Mandrill?如何?
您必须编写自己的“Mandrill发送电子邮件”课程。
使用SendSESEmail
作为起点,但不使用AWS密钥,而是使用Mandrill的凭据。
你send_message
应该看起来像这样:
def send_message(self, message):
s = smtplib.SMTP('smtp.mandrillapp.com', 587)
s.login(MANDRILL_USERNAME, MANDRILL_PASSWORD)
s.send_message(message)
(基于这个片段:https://mandrill.com/#script-python)
希望它能帮到你。