В 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
U.S. offers to pay relatives of Kabul drone victims
The U.S. government offered to pay compensation to the relatives of 10 people who were killed in a botched U.S. drone attack in Kabul, Afghanistan. It also will help the victims' family members who wish to relocate to the United States
#News#Reuters#Kabul#Afghanistan#DroneAttack
Subscribe: http://smarturl.it/reuterssubscribe
Reuters brings you the latest business, finance and breaking news video from around the globe. Our reputation for accuracy and impartiality is unparalleled.
Get the latest news on: http://reuters.com/
Follow Reuters on Facebook: https://www.facebook.com/Reuters
Follow Reuters on Twitter: https://twitter.com/Reuters
Follow Reuters on Instagram: https://www.instagram.com/reuters/?hl=en
➖@reutersworldchannel➖
Future at stake for Kabul orphanage
The program director at a large Kabul orphanage says he is cutting back on the amount of fruit and meat he gives the children each week because the home is running out of money
#News#Reuters#Kabul#Taliban#Orphanage#Afghanistan
Subscribe: http://smarturl.it/reuterssubscribe
Reuters brings you the latest business, finance and breaking news video from around the globe. Our reputation for accuracy and impartiality is unparalleled.
Get the latest news on: http://reuters.com/
Follow Reuters on Facebook: https://www.facebook.com/Reuters
Follow Reuters on Twitter: https://twitter.com/Reuters
Follow Reuters on Instagram: https://www.instagram.com/reuters/?hl=en
➖@reutersworldchannel➖
Команда Волгоградского Дома Дружбы приняла участие в акции #БессмертныйПолк в Афганистане. Здесь не только наши соотечественники, но и местные жители помнят, какой ценной завоеван мир в годы Великой Отечественной войны.
После делегация встретилась с сотрудниками консульства и обсудила ряд важнейших вопросов.
#ДеньПобеды#Победа79#Кабул#Афганистан#Victory79#VictoryDay#Kabul#Afghanistan
@MID_Russia#ДомДружбыВолгоград#народывместесквозьгода