fix the email service

This commit is contained in:
ismail 2025-11-19 13:19:07 +03:00
parent 7224004816
commit e675a8260c
2 changed files with 69 additions and 77 deletions

View File

@ -360,14 +360,6 @@ def send_bulk_email(subject, message, recipient_list, request=None, attachments=
else: else:
# --- 3. Handle SYNCHRONOUS Send (No changes needed here, as it was fixed previously) --- # --- 3. Handle SYNCHRONOUS Send (No changes needed here, as it was fixed previously) ---
try:
# NOTE: The synchronous block below should also use the 'customized_sends'
# list for consistency instead of rebuilding messages from 'pure_candidate_emails'
# and 'agency_emails', but keeping your current logic structure to minimize changes.
from_email = getattr(settings, 'DEFAULT_FROM_EMAIL', 'noreply@kaauh.edu.sa')
is_html = '<' in message and '>' in message
successful_sends = 0
try: try:
# NOTE: The synchronous block below should also use the 'customized_sends' # NOTE: The synchronous block below should also use the 'customized_sends'
# list for consistency instead of rebuilding messages from 'pure_candidate_emails' # list for consistency instead of rebuilding messages from 'pure_candidate_emails'