简体   繁体   中英

How to test for sending emails in python?

I'm writing a set of black box tests for my application. I'm using smtplib for sending the emails, and I want to test whether emails are being sent/received properly.

Any ideas on how to do that in python?

Use one of the following to test that your emails are sent.

you can use mailhog ,

you can run it locally using the docker image

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM