В 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
Curated Crypto | ꘜ
🤑WTF: ETH options open interest just hit a 1.5-year high!
Degens are loading up on longs, while whales are stacking ETH at all-time record pace!
But hedge funds are going mega short - CME ETH futures short positioning just keeps smashing new records!
Green But Red in real life!
#WTF
The suspect attempted to escape an interrogation room by breaking through the wall while no one was watching—only to be caught shortly after.
@Viral_Today / #wtf
Imagine a coffee table that moves around the house by itself—well, you don’t have to anymore because it’s real. It’s just as fascinating as it is creepy.
@Viral_Today / #wtf