2.1.29 check problem send mail
This commit is contained in:
@@ -203,6 +203,8 @@ def mailing_subscribe_ajax(request):
|
||||
|
||||
|
||||
def send_message_ajax(request):
|
||||
print('send_message_ajax')
|
||||
|
||||
if request.method != 'POST':
|
||||
raise Http404
|
||||
|
||||
@@ -311,14 +313,18 @@ def send_message_ajax(request):
|
||||
f'</p>'
|
||||
}
|
||||
|
||||
print('render html for mail')
|
||||
|
||||
html = render_to_string('mail/m_request_offer.html', Dict, request)
|
||||
from BaseModels.mailSender import admin_send_mail_by_SMTPlib
|
||||
mail_sets = get_mail_send_options()
|
||||
opts = get_options_by_opt_types('support_email', only_vals=True)
|
||||
print(f'options: {str(opts)}')
|
||||
if opts and 'support_email' in opts:
|
||||
to = [opts['support_email']]
|
||||
else:
|
||||
to = [mail_sets['sender_email']]
|
||||
print(f'to: {str(to)}')
|
||||
res = admin_send_mail_by_SMTPlib(
|
||||
mail_sets,
|
||||
subject=subject,
|
||||
|
||||
Reference in New Issue
Block a user