Deploy updates
This commit is contained in:
@@ -361,17 +361,6 @@ def send_vk_operator_notification(reg_id, data, paid=False):
|
||||
message = (
|
||||
f"🌐 **Новая активность на сайте ИКП!**\n\n"
|
||||
f"Статус: {status_emoji}\n"
|
||||
f"🆔 ID заявки: {reg_id}\n"
|
||||
f"👤 Имя: {data.get('name', '').strip()}\n"
|
||||
f"📞 Телефон: {data.get('phone', '').strip()}\n"
|
||||
f"✉️ E-mail: {data.get('email', '').strip()}\n"
|
||||
f"🌐 Профиль VK: {data.get('vk', '').strip()}\n"
|
||||
f"🏆 Услуга: {data.get('serviceName', '').strip()}\n"
|
||||
f"💰 Сумма: {data.get('servicePrice', '')} ₽\n\n"
|
||||
f"⚖️ Согласия пользователя:\n"
|
||||
f"• Оферта: {'Да' if data.get('agreeOferta') else 'Нет'}\n"
|
||||
f"• Политика ПД: {'Да' if data.get('agreePolicy') else 'Нет'}\n"
|
||||
f"• Рассылка: {'Да' if data.get('agreeNewsletter') else 'Нет'}\n"
|
||||
)
|
||||
|
||||
vk.messages.send(
|
||||
@@ -379,9 +368,8 @@ def send_vk_operator_notification(reg_id, data, paid=False):
|
||||
message=message,
|
||||
random_id=get_random_id()
|
||||
)
|
||||
print(f"[VK NOTIFICATION] Отправлено уведомление оператору (ID: {operator_id}) для {reg_id}.")
|
||||
except Exception as e:
|
||||
print(f"[VK NOTIFICATION] Ошибка при отправке уведомления в VK: {e}")
|
||||
print(f"[VK] Ошибка отправки уведомления: {e}")
|
||||
|
||||
def send_email_notification(reg_id, data, paid=False):
|
||||
"""Send SMTP email notification."""
|
||||
@@ -390,7 +378,10 @@ def send_email_notification(reg_id, data, paid=False):
|
||||
smtp_user = config.SMTP_USER
|
||||
smtp_password = config.SMTP_PASSWORD
|
||||
smtp_from = config.SMTP_FROM or smtp_user
|
||||
smtp_to = config.SMTP_TO or smtp_user
|
||||
smtp_to_raw = config.SMTP_TO or smtp_user
|
||||
smtp_to = [email.strip() for email in smtp_to_raw.split(',')]
|
||||
|
||||
print(f"[SMTP] Настройки: Server={smtp_server}, Port={smtp_port}, User={smtp_user}, To={smtp_to}")
|
||||
|
||||
if not smtp_server or not smtp_user or not smtp_password:
|
||||
print("[SMTP] Пропущено: параметры SMTP не заполнены в .env")
|
||||
|
||||
Reference in New Issue
Block a user