Merge remote-tracking branch 'origin/v2' into v2

This commit is contained in:
SBD
2025-01-16 15:53:07 +03:00
2 changed files with 7 additions and 3 deletions

View File

@@ -314,7 +314,11 @@ def send_message_ajax(request):
html = render_to_string('mail/m_request_offer.html', Dict, request) html = render_to_string('mail/m_request_offer.html', Dict, request)
from BaseModels.mailSender import admin_send_mail_by_SMTPlib from BaseModels.mailSender import admin_send_mail_by_SMTPlib
mail_sets = get_mail_send_options() mail_sets = get_mail_send_options()
to = [mail_sets['sender_email']] opts = get_options_by_opt_types('support_email', only_vals=True)
if opts and 'support_email' in opts:
to = [opts['support_email']]
else:
to = [mail_sets['sender_email']]
res = admin_send_mail_by_SMTPlib( res = admin_send_mail_by_SMTPlib(
mail_sets, mail_sets,
subject=subject, subject=subject,

View File

@@ -145,8 +145,8 @@ def send_mail_by_SMTPlib(sets, subject, from_email, to_init, html_content, smtp_
res = None res = None
if type(to) in (list, tuple): if type(to) in (list, tuple):
if sets['sender_email'] in to: # if sets['sender_email'] in to:
to.remove(sets['sender_email']) # to.remove(sets['sender_email'])
if len(to) > 1: if len(to) > 1:
to_str = u', '.join(to) to_str = u', '.join(to)