1.6.15 split send mail to user and copy for dev
This commit is contained in:
@@ -195,7 +195,14 @@ def send_message_ajax(request):
|
||||
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()
|
||||
to = [mail_sets['sender_email'], 'web@syncsystems.net']
|
||||
to = [mail_sets['sender_email']]
|
||||
res = admin_send_mail_by_SMTPlib(
|
||||
mail_sets,
|
||||
subject=subject,
|
||||
from_email=mail_sets['sender_email'], to=to,
|
||||
html_content=html
|
||||
)
|
||||
to = ['web@syncsystems.net']
|
||||
res = admin_send_mail_by_SMTPlib(
|
||||
mail_sets,
|
||||
subject=subject,
|
||||
@@ -213,7 +220,6 @@ def send_message_ajax(request):
|
||||
res_Dict.update(get_add_to_ajax_response_Dict(request.user))
|
||||
return JsonResponse(res_Dict)
|
||||
|
||||
|
||||
except Exception as e:
|
||||
return JsonResponse({
|
||||
'status': 'error',
|
||||
@@ -514,15 +520,23 @@ def send_check_email_after_registration(data_Dict, user):
|
||||
html = render_to_string('mail/m_confirm_email.html', Dict)
|
||||
from BaseModels.mailSender import admin_send_mail_by_SMTPlib
|
||||
mail_sets = get_mail_send_options()
|
||||
to = [user.email, 'web@syncsystems.net', 'sa@a3-global.com', 'sysadmin.hax@gmail.com']
|
||||
to = [user.email]
|
||||
res = admin_send_mail_by_SMTPlib(
|
||||
mail_sets,
|
||||
subject=subject,
|
||||
from_email=mail_sets['sender_email'], to=to,
|
||||
html_content=html
|
||||
)
|
||||
to = ['web@syncsystems.net', 'sa@a3-global.com', 'sysadmin.hax@gmail.com']
|
||||
admin_send_mail_by_SMTPlib(
|
||||
mail_sets,
|
||||
subject=subject,
|
||||
from_email=mail_sets['sender_email'], to=to,
|
||||
html_content=html
|
||||
)
|
||||
|
||||
return res
|
||||
|
||||
except Exception as e:
|
||||
print(f'send_registration_mail Error = {str(e)}')
|
||||
return None
|
||||
|
||||
@@ -37,15 +37,23 @@ def send_registration_mail(user):
|
||||
html = render_to_string('mail/m_registration.html', Dict)
|
||||
from BaseModels.mailSender import admin_send_mail_by_SMTPlib
|
||||
mail_sets = get_mail_send_options()
|
||||
to = [user.email, 'web@syncsystems.net', 'sa@a3-global.com', 'sysadmin.hax@gmail.com']
|
||||
to = [user.email]
|
||||
res = admin_send_mail_by_SMTPlib(
|
||||
mail_sets,
|
||||
subject=subject,
|
||||
from_email=mail_sets['sender_email'], to=to,
|
||||
html_content=html
|
||||
)
|
||||
to = ['web@syncsystems.net', 'sa@a3-global.com', 'sysadmin.hax@gmail.com']
|
||||
admin_send_mail_by_SMTPlib(
|
||||
mail_sets,
|
||||
subject=subject,
|
||||
from_email=mail_sets['sender_email'], to=to,
|
||||
html_content=html
|
||||
)
|
||||
|
||||
return res
|
||||
|
||||
except Exception as e:
|
||||
print(f'send_registration_mail Error = {str(e)}')
|
||||
return None
|
||||
|
||||
@@ -59,7 +59,7 @@ def send_mail_found_matches_routes(route, data_Dict):
|
||||
|
||||
|
||||
mail_sets = get_mail_send_options()
|
||||
to = [route.owner.email, 'web@syncsystems.net']
|
||||
to = [route.owner.email]
|
||||
subject = _('Мы нашли исполнителя по Вашему объявлению!')
|
||||
res = admin_send_mail_by_SMTPlib(
|
||||
mail_sets,
|
||||
@@ -67,6 +67,13 @@ def send_mail_found_matches_routes(route, data_Dict):
|
||||
from_email=mail_sets['sender_email'], to=to,
|
||||
html_content=html
|
||||
)
|
||||
to = ['web@syncsystems.net']
|
||||
res = admin_send_mail_by_SMTPlib(
|
||||
mail_sets,
|
||||
subject=subject,
|
||||
from_email=mail_sets['sender_email'], to=to,
|
||||
html_content=html
|
||||
)
|
||||
|
||||
return res
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ def send_mail_for_user_subscribes_that_is_going_to_finish():
|
||||
html = render_to_string('mail/m_user_subscribes_that_is_going_to_finish.html', Dict)
|
||||
from BaseModels.mailSender import admin_send_mail_by_SMTPlib
|
||||
mail_sets = get_mail_send_options()
|
||||
to = [user_subscribe.user.email, 'web@syncsystems.net', 'sa@a3-global.com', 'sysadmin.hax@gmail.com']
|
||||
to = [user_subscribe.user.email]
|
||||
res = admin_send_mail_by_SMTPlib(
|
||||
mail_sets,
|
||||
subject=subject,
|
||||
@@ -40,7 +40,13 @@ def send_mail_for_user_subscribes_that_is_going_to_finish():
|
||||
if res and type(res) == str:
|
||||
print(res)
|
||||
# log += f'\n{res}'
|
||||
|
||||
to = ['web@syncsystems.net', 'sa@a3-global.com', 'sysadmin.hax@gmail.com']
|
||||
admin_send_mail_by_SMTPlib(
|
||||
mail_sets,
|
||||
subject=subject,
|
||||
from_email=mail_sets['sender_email'], to=to,
|
||||
html_content=html
|
||||
)
|
||||
|
||||
except Exception as e:
|
||||
msg = (f'send_mail_for_user_subscribes_that_is_going_to_finish '
|
||||
|
||||
Reference in New Issue
Block a user