结合使用烧瓶邮件和Amazon SES

时间:2020-09-08 11:44:25

标签: flask amazon-ses flask-mail

我想将Flask邮件与Amazon SES一起使用。我知道可以改用boto库,但从长远来看,我想使用其他的smtps。 (因此,该问题与How to adapt flask-mail to support two SMTP accounts不同)

因此,我在Amazon SES中注册,并获得了客户端ID和密码ID。我还注册了要在我的应用程序中发送电子邮件的邮件地址。现在,我的问题是,我应该如何配置我的应用程序(请参见下面的变量)?

MAIL_USERNAME = config.get('mail_service', 'USER')
MAIL_PASSWORD = config.get('mail_service', 'PASSWD')
MAIL_SERVER = config.get('mail_service', 'MAIL_SERVER')
MAIL_PORT = 587

对于MAIL_SERVER,我已经找到了。但是,对于用户名和密码,我不确定如何同时提供mail_adress(example@gmail.com),client_id(SES)和密码(SES中的邮件密码+ secret_id)。

有什么想法吗?

非常感谢

0 个答案:

没有答案
相关问题