|
|
|
|
@ -399,6 +399,13 @@ class ProspectAdmin(SyncedObjectAdmin): |
|
|
|
|
fail_silently=False, |
|
|
|
|
) |
|
|
|
|
sent_count += 1 |
|
|
|
|
|
|
|
|
|
activity = Activity.objects.create( |
|
|
|
|
type=ActivityType.MAIL, |
|
|
|
|
status=Status.CONTACTED, |
|
|
|
|
description=f"Email sent: {email_template.subject}" |
|
|
|
|
) |
|
|
|
|
activity.prospects.add(prospect) |
|
|
|
|
except Exception as e: |
|
|
|
|
error_emails.append(prospect.email) |
|
|
|
|
logger.error(f'Failed to send email to {prospect.email}: {str(e)}') |
|
|
|
|
|