В 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
Apple Strudel
Ingredients for the dough:
🍚 250g all-purpose flour
💧 100 ml water
🥚 1 egg
🌿 20g vegetable oil
🧂 1 pinch of salt
For the filling:
🍏 4 Granny Smith apples, peeled and sliced
🍋 Lemon juice
🍇 100g dried cranberries
🍞 100g breadcrumbs
🧈 50g butter (melted, for brushing the dough and sautéing the breadcrumbs)
🌰 50g candied pecans, chopped
🍂 1 tsp cinnamon
🍬 70g sugar
🍨 1 scoop of ice cream
#sweet
@dishes
Pavlova
5 large egg whites 🥚 (at room temperature)
270g. Extra fine sugar or caster sugar 🍬
4g. Cream of tartar or 1 tsp white vinegar 🍶
1 Tbsp Cornstarch 🌽
For topping cream:
1 1/2 cup heavy whipped cream 🍦
50g. powdered sugar 🍚
1/2 tsp vanilla extract 🌸
For syrup:
1 1/2 cup Hibiscus flowers 🌺
2 cups sugar 🍬
Lemon zest 🍋
Fresh fruit or any berries for topping 🍓🍇
#sweet
@dishes
➡️New build available for Xiaomi Redmi Note 10 Pro / Pro Max (sweet)
👤 by Pulkit Agarwal
ℹ️ Version: 13
📆 Build date: November 23, 2023 04:24
📂 File size: 1.73 GB
⬇️ Download now
#sweet#pixelexperience