debugged some stuff
This commit is contained in:
@@ -532,6 +532,7 @@ class CampaignsController {
|
||||
|
||||
// Send email if SMTP method
|
||||
if (emailMethod === 'smtp') {
|
||||
console.log('DEBUG: About to send campaign email...');
|
||||
emailResult = await emailService.sendCampaignEmail(
|
||||
recipientEmail,
|
||||
userEmail,
|
||||
@@ -543,9 +544,11 @@ class CampaignsController {
|
||||
recipientName,
|
||||
recipientLevel
|
||||
);
|
||||
console.log('DEBUG: Campaign email service returned:', emailResult);
|
||||
}
|
||||
|
||||
// Log the campaign email
|
||||
console.log('DEBUG: About to log campaign email with emailResult:', emailResult);
|
||||
await nocoDB.logCampaignEmail({
|
||||
campaign_id: campaign.ID || campaign.Id || campaign.id,
|
||||
campaign_slug: slug,
|
||||
@@ -561,6 +564,7 @@ class CampaignsController {
|
||||
message: message,
|
||||
status: emailMethod === 'mailto' ? 'clicked' : (emailResult.success ? 'sent' : 'failed')
|
||||
});
|
||||
console.log('DEBUG: Campaign email logged with status:', emailMethod === 'mailto' ? 'clicked' : (emailResult.success ? 'sent' : 'failed'));
|
||||
|
||||
if (emailMethod === 'smtp') {
|
||||
if (emailResult.success) {
|
||||
|
||||
Reference in New Issue
Block a user