В Python есть удобный почтовый debug-сервер. Он поможет проверить работу почты вашего web-проекта на этапе разработки без необходимости настраивать внешние сервисы или взаимодействие с реальными серверами Google или Yandex. Этот сервер просто печатает все сообщения в консоль.
Таким образом удобно дебажить одноразовые ссылки активации или просто факт отправки письма по расписанию.
Запускается очень просто:
python3 -m smtpd -n -c DebuggingServer localhost:1025
Теперь настройте ваш проект на использование этого сервера. Например вот так настраивается Django:
# settings.py
if DEBUG:
EMAIL_HOST = 'localhost'
EMAIL_PORT = 1025
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
EMAIL_USE_TLS = False
DEFAULT_FROM_EMAIL = '[email protected]'
#django#tricks
A mid-career switch from worldwide travel to the tech and gaming world is unusual but for Nelly Lee, it was one of necessity. Read on to find out how she upskilled to pull it off 💪go.gov.sg/ssg-20240530tg
#SkillsFuture#Lifelonglearning
Searching for a better way to serve the community, Bony found his calling in the healthcare industry 🩺 Discover why Bony made the switch here 👉https://go.gov.sg/ssg-20241003tg1
#SkillsFuture#LifelongLearning#Midcareer
With graduation round the corner, Norazlina is eager to explore her next educational pursuits 🎓 Discover her upskilling journey here ➡️https://go.gov.sg/ssg-20240903tg
#SkillsFuture#LifelongLearning#Midcareer
Are you at a pivotal point in your career? 🤔 Seek guidance through our Skills and Training Advisory to chart the most optimal route forward for your professional journey 👉🏻go.gov.sg/ssg-20240521tg
#SkillsFuture#Lifelonglearning#midcareer