В 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
🌍 Tokyo’s Shinjuku train station is the world’s busiest, with over 3.5 million passengers passing through daily. Its vast underground networks are so complex that some exits are kilometers apart. ✨
#urbanization⚡#infrastructure⚡#transit⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌍 Tokyo’s rail system is so efficient that over 13 billion train trips are made each year within the city. This high-capacity network helps keep the world’s largest metropolitan area moving smoothly. ✨
#Tokyo⚡#transit⚡#urban⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography🌍
【TokenPocket Retweeted】
Retweeted TransitFinance : Unlimit Crypto is live🚀! Transit Buy goes global, unlocking infinite crypto possibilities!
🚀#Transit#Buy is now integrated with Unlimit Crypto unlimit_crypto, providing crypto on-ramp support to hundreds of thousands of users globally.
Transit Buy spans the global entry points for #fiat and #cryptocurrency, ensuring #seamless access for you! #Crypto#TransitBuy#UnlimitCrypto
【Details】https://twitter.com/TokenPocket_TP/status/1746088055679934633
【Powered By】Crypto Box