Skip to content

feat: add suppression list#192

Merged
KMKoushik merged 5 commits intomainfrom
km/2025-07-27-supression-list
Jul 27, 2025
Merged

feat: add suppression list#192
KMKoushik merged 5 commits intomainfrom
km/2025-07-27-supression-list

Conversation

@KMKoushik
Copy link
Copy Markdown
Member

No description provided.

@claude
Copy link
Copy Markdown

claude Bot commented Jul 26, 2025

Claude finished @KMKoushik's task —— View job


Code Review for Suppression List Feature

I've completed a comprehensive review of the suppression list implementation. Here's my detailed analysis:

Review Progress

  • Analyze database schema and migration changes
  • Review backend services and API implementation
  • Examine frontend components and UX
  • Check for security concerns
  • Assess performance implications
  • Verify best practices adherence
  • Provide comprehensive feedback

📋 Summary

This PR introduces a comprehensive email suppression list feature that automatically prevents emails from being sent to bounced/complained addresses and provides manual suppression management. The implementation is well-architected with proper separation of concerns between database, service, API, and UI layers.

✅ Strengths

Database Design

  • Excellent schema design with proper constraints and indexes
  • Unique composite index on (teamId, email) prevents duplicates efficiently
  • Proper foreign key cascade behavior for team deletion
  • Good enum design for suppression reasons

Backend Architecture

  • Clean service layer with proper error handling and logging
  • Comprehensive API with pagination, filtering, and bulk operations
  • Excellent integration with email sending workflow - checks suppression before sending
  • Automatic suppression on hard bounces and complaints via webhooks
  • Proper batch processing for bulk operations (100 emails at a time)

Frontend Implementation

  • Intuitive UI with proper loading states and error handling
  • Good UX patterns: search, filtering, pagination, bulk operations
  • Proper form validation and user feedback
  • Export functionality for data portability

⚠️ Issues & Recommendations

Security Concerns

  1. Email Enumeration Risk (add-suppression.tsx:86-94)

    // This allows checking if emails exist in suppression list
    const { data: isAlreadySuppressed } = await checkMutation.refetch();

    Risk: Users can check if any email is suppressed for their team
    Recommendation: Consider removing this check or limiting it to prevent enumeration attacks

  2. Export Limit Too High (suppression.ts:135)

    limit: 10000, // Large limit for export

    Risk: Large exports could impact performance and expose data
    Recommendation: Implement streaming export or lower limit (e.g., 1000)

Performance Issues

  1. Inefficient Bulk Email Checking (email-service.ts:77-81)

    const suppressedEmails = await Promise.all(
      emailsToCheck.map((email) =>
        SuppressionService.isEmailSuppressed(email, teamId)
      )
    );

    Issue: N database queries instead of 1
    Fix: Use checkMultipleEmails instead:

    const suppressionResults = await SuppressionService.checkMultipleEmails(emailsToCheck, teamId);
  2. Potential Database Load (suppression-service.ts:254-255)

    const batchResults = await Promise.all(
      batch.map((suppression) => this.addSuppression(suppression))

    Issue: Could overwhelm database with concurrent upserts
    Recommendation: Use a single batch upsert operation

Code Quality Issues

  1. Inconsistent Error Handling (suppression-service.ts:118)

    // In case of error, err on the side of caution and don't suppress
    return false;

    Issue: Silent failures could lead to sending to suppressed emails
    Recommendation: Log errors and consider alternative approaches

  2. Magic Numbers (bulk-add-suppressions.tsx:122)

    if (validEmails.length > 1000) {

    Recommendation: Extract to constants or environment variables

  3. Missing Validation (suppression.ts:79)

    emails: z.array(z.string().email()).max(1000),

    Issue: Should validate against existing suppressions to prevent errors

Best Practices

  1. Email Normalization Inconsistency

    • Most places use .toLowerCase().trim() but should be consistent everywhere
    • Consider extracting to a utility function
  2. Missing Rate Limiting

    • Bulk operations could be abused
    • Consider implementing rate limits on suppression additions

🚀 Suggestions for Enhancement

Immediate Fixes

  1. Fix bulk email checking performance:

    // In sendEmail function, replace lines 77-85 with:
    const suppressionResults = await SuppressionService.checkMultipleEmails(emailsToCheck, teamId);
    const suppressedEmailAddresses = emailsToCheck.filter(email => suppressionResults[email]);
  2. Add batch upsert for better performance:

    static async addMultipleSuppressions(suppressions: AddSuppressionParams[]): Promise<SuppressionList[]> {
      // Use Prisma's createMany or raw SQL for better performance
      const data = suppressions.map(s => ({
        email: s.email.toLowerCase().trim(),
        teamId: s.teamId,
        reason: s.reason,
        source: s.source,
      }));
      
      return await db.suppressionList.createMany({
        data,
        skipDuplicates: true, // Handle conflicts gracefully
      });
    }
  3. Add validation middleware to prevent duplicate suppression attempts

Future Enhancements

  • Suppression expiry: Add optional expiration dates for suppressions
  • Audit logging: Track who added/removed suppressions
  • Suppression categories: Different suppression types (temporary vs permanent)
  • Integration testing: Add comprehensive tests for the suppression workflow

🏆 Overall Assessment

Score: 8.5/10 - This is a well-implemented feature with excellent architecture and user experience. The main issues are around performance optimization and security considerations that should be addressed before merging.

The integration with the email sending pipeline is particularly well done, and the automatic suppression on bounces/complaints is a critical feature for email deliverability.


@KMKoushik
Copy link
Copy Markdown
Member Author

bugbot run

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bugbot free trial expires on July 29, 2025
Learn more in the Cursor dashboard.

Comment thread apps/web/src/server/service/email-service.ts
@claude
Copy link
Copy Markdown

claude Bot commented Jul 27, 2025

Claude finished @KMKoushik's task —— View job


Code Review for Suppression List Feature

I've completed a comprehensive review of this suppression list implementation. Here's my detailed analysis:

Review Progress

  • Analyze core service implementation (suppression-service.ts, email-service.ts)
  • Review database schema and migration
  • Examine API implementation and validation
  • Check frontend components and UX
  • Identify security vulnerabilities
  • Assess performance implications
  • Verify the CC/BCC bug reported by Cursor
  • Provide final recommendations and summary

📋 Summary

This PR implements a comprehensive email suppression list feature with good architecture and UX. However, there are critical bugs and security concerns that must be addressed before merging.

🚨 CRITICAL ISSUES

1. CC/BCC Recipients Not Checked for Suppression

Severity: Critical
Location: email-service.ts:75-92 and 290-312

// PROBLEM: Only checks 'to' recipients
const emailsToCheck = Array.isArray(to) ? to : [to];

Impact: Suppressed emails can bypass the system via CC/BCC
Fix: Include all recipients:

const emailsToCheck = [
  ...(Array.isArray(to) ? to : [to]),
  ...(cc ? (Array.isArray(cc) ? cc : [cc]) : []),
  ...(bcc ? (Array.isArray(bcc) ? bcc : [bcc]) : [])
];

2. Performance: N+1 Database Queries

Severity: High
Location: email-service.ts:77-81

// INEFFICIENT: N database queries
const suppressedEmails = await Promise.all(
  emailsToCheck.map((email) =>
    SuppressionService.isEmailSuppressed(email, teamId)
  )
);

Fix: Use the existing batch method:

const suppressionResults = await SuppressionService.checkMultipleEmails(emailsToCheck, teamId);

⚠️ SECURITY CONCERNS

3. Email Enumeration Risk

Location: suppression.ts:96-104 (checkSuppression endpoint)

  • Allows checking if any email is suppressed for a team
  • Could be used to enumerate suppressed email addresses
  • Recommendation: Remove endpoint or add rate limiting

4. Silent Database Failures

Location: suppression-service.ts:118

// RISK: Could send to suppressed emails if DB fails
return false;

Recommendation: Log errors and consider fail-safe approach

5. Large Export Without Limits

Location: suppression.ts:135

limit: 10000, // Risk: Memory/performance issues

Recommendation: Implement streaming or pagination

🐛 OTHER ISSUES

6. Email Enumeration in Frontend

Location: add-suppression.tsx:86-94

const { data: isAlreadySuppressed } = await checkMutation.refetch();

Enables checking suppressed status before adding - potential enumeration vector.

7. Inconsistent Batch Processing

Location: suppression-service.ts:254-255

await Promise.all(batch.map((suppression) => this.addSuppression(suppression)))

Could overwhelm database with concurrent upserts. Use single batch operation instead.

8. Magic Numbers

Location: bulk-add-suppressions.tsx:155

if (validEmails.length > 1000) {

Extract to constants or environment variables.

✅ STRENGTHS

  • Excellent database schema with proper indexes and constraints
  • Good service layer with proper error handling and logging
  • Clean API design with validation and pagination
  • Intuitive frontend with good UX patterns
  • Proper webhook integration for automatic suppression
  • Comprehensive functionality: add, remove, bulk operations, export

🔧 RECOMMENDED FIXES

Immediate (Must Fix Before Merge)

  1. Fix CC/BCC bug - Update both sendEmail and sendBulkEmails functions
  2. Fix N+1 query performance - Use checkMultipleEmails consistently
  3. Remove or secure enumeration endpoints

Important (Should Fix Soon)

  1. Add rate limiting to suppression APIs
  2. Implement streaming export or lower limits
  3. Add batch upsert for better performance
  4. Extract magic numbers to constants

Enhancements (Future)

  1. Add audit logging for suppression changes
  2. Add suppression expiry for temporary blocks
  3. Add integration tests for suppression workflow

🏆 Overall Assessment

Score: 7/10 - Well-architected feature with critical bugs that need immediate attention.

The implementation shows good understanding of email deliverability needs and provides a solid foundation. The critical CC/BCC bug and performance issues are fixable and should be addressed before merging.


Comment thread apps/web/src/app/(dashboard)/suppressions/suppression-list.tsx Outdated
@claude
Copy link
Copy Markdown

claude Bot commented Jul 27, 2025

Claude finished @KMKoushik's task —— View job


Code Review for Suppression List Feature

I've completed a comprehensive review of this suppression list implementation. Here's my detailed analysis:

Review Progress

  • Analyze core service implementation and critical bugs
  • Review database schema and migration
  • Examine API implementation and validation
  • Check frontend components and UX
  • Identify security vulnerabilities
  • Assess performance implications
  • Provide final recommendations and summary

📋 Summary

This PR implements a comprehensive email suppression list feature with good architecture and UX. However, there are critical bugs and security concerns that must be addressed before merging.

🚨 CRITICAL ISSUES (Must Fix Before Merge)

1. CC/BCC Recipients Bypass Suppression - email-service.ts:75-76, 318-320

Severity: Critical
Impact: Suppressed emails can be sent via CC/BCC, bypassing the entire suppression system

// PROBLEM: Only checks 'to' recipients
const emailsToCheck = Array.isArray(to) ? to : [to];

Fix Required: Include all recipients:

const emailsToCheck = [
  ...(Array.isArray(to) ? to : [to]),
  ...(cc ? (Array.isArray(cc) ? cc : [cc]) : []),
  ...(bcc ? (Array.isArray(bcc) ? bcc : [bcc]) : [])
];

2. N+1 Database Performance Issue - email-service.ts:78-80

Severity: High
Impact: Makes N database queries instead of 1, severely degrading performance

// INEFFICIENT: N separate database calls
const filteredToEmails = emailsToCheck.filter(
  (email) => !SuppressionService.isEmailSuppressed(email, teamId)
);

Fix Required: Use the existing batch method:

const suppressionResults = await SuppressionService.checkMultipleEmails(emailsToCheck, teamId);
const filteredToEmails = emailsToCheck.filter(email => !suppressionResults[email]);

3. Incorrect Table colSpan - suppression-list.tsx:161, 170

Severity: Medium
Impact: Visual bug with loading/empty states spanning wrong number of columns

<TableCell colSpan={5}>  // WRONG: Table only has 4 columns

Should be: colSpan={4}

⚠️ SECURITY CONCERNS

4. Email Enumeration Risk - suppression.ts:96-104, add-suppression.tsx:86-94

Severity: Medium
Impact: Allows checking if any email is suppressed for a team

  • API endpoint checkSuppression enables enumeration attacks
  • Frontend pre-check reveals suppression status to users
  • Recommendation: Remove endpoint or add rate limiting

5. Large Export Without Limits - suppression.ts:135

Severity: Medium
Impact: Could impact performance and expose large datasets

limit: 10000, // Risk: Memory/performance issues

Recommendation: Implement streaming export or pagination

6. Silent Database Failures - suppression-service.ts:118

Severity: Medium
Impact: Could send to suppressed emails if database fails

// RISK: Returns false on error, could bypass suppression
return false;

Recommendation: Log errors and consider fail-safe approach

🐛 OTHER ISSUES

7. Batch Processing Performance - suppression-service.ts:254-255

Severity: Medium
Impact: Could overwhelm database with concurrent upserts

await Promise.all(batch.map((suppression) => this.addSuppression(suppression)))

Recommendation: Use single batch upsert operation instead

8. Magic Numbers - bulk-add-suppressions.tsx:155

Severity: Low
Impact: Hard-coded limits reduce maintainability

if (validEmails.length > 1000) {

Recommendation: Extract to constants or environment variables

✅ STRENGTHS

Database Design

  • Excellent schema with proper constraints and unique composite index
  • Good enum design for suppression reasons and email status
  • Proper foreign key cascading for team deletion

Service Architecture

  • Clean service layer with comprehensive error handling
  • Good separation of concerns between suppression and email services
  • Proper webhook integration for automatic suppression on bounces/complaints

Frontend Implementation

  • Intuitive UI with proper loading states and error handling
  • Good UX patterns: search, filtering, pagination, bulk operations
  • Export functionality for data portability

API Design

  • Comprehensive endpoints with proper validation
  • Good pagination and filtering support
  • Proper input validation using Zod schemas

🔧 RECOMMENDED FIXES

Immediate (Must Fix Before Merge)

  1. Fix CC/BCC bug - Update both sendEmail and sendBulkEmails functions
  2. Fix N+1 query performance - Use checkMultipleEmails consistently
  3. Fix colSpan bug - Change from 5 to 4 columns
  4. Remove or secure enumeration endpoints - Add rate limiting or remove

Important (Should Fix Soon)

  1. Add rate limiting to suppression APIs
  2. Implement streaming export or lower limits
  3. Add batch upsert for better performance
  4. Extract magic numbers to constants

Enhancements (Future)

  1. Add audit logging for suppression changes
  2. Add suppression expiry for temporary blocks
  3. Add integration tests for suppression workflow

🏆 Overall Assessment

Score: 7/10 - Well-architected feature with critical bugs that need immediate attention.

The implementation shows good understanding of email deliverability needs and provides a solid foundation. The critical CC/BCC bug and performance issues are fixable and should be addressed before merging.

The automatic suppression on bounces/complaints is particularly well implemented and crucial for email deliverability.


Comment thread apps/web/src/server/service/email-service.ts
@claude
Copy link
Copy Markdown

claude Bot commented Jul 27, 2025

Claude finished @KMKoushik's task —— View job


Code Review for Suppression List Feature

I've completed a comprehensive review of this suppression list implementation. Here's my detailed analysis:

Review Progress

  • Analyze database schema and migration changes
  • Review core service implementation (suppression-service.ts, email-service.ts)
  • Examine API endpoints and validation (suppression.ts router)
  • Check frontend components and UX implementation
  • Verify critical bugs identified in previous reviews
  • Assess security vulnerabilities and concerns
  • Evaluate performance implications
  • Provide comprehensive feedback and recommendations

📋 Summary

This PR implements a comprehensive email suppression list feature with good architecture and UX. However, there are critical bugs and security concerns that must be addressed before merging.

🚨 CRITICAL ISSUES (Must Fix Before Merge)

1. CC/BCC Recipients Bypass Suppression - email-service.ts:75-76

Severity: Critical
Impact: Suppressed emails can be sent via CC/BCC, bypassing the entire suppression system

// PROBLEM: Only checks 'to' recipients
const emailsToCheck = Array.isArray(to) ? to : [to];

Fix Required: Include all recipients:

const emailsToCheck = [
  ...(Array.isArray(to) ? to : [to]),
  ...(cc ? (Array.isArray(cc) ? cc : [cc]) : []),
  ...(bcc ? (Array.isArray(bcc) ? bcc : [bcc]) : [])
];

2. Incorrect Table colSpan - suppression-list.tsx:161, 170

Severity: Medium
Impact: Visual bug with loading/empty states spanning wrong number of columns

<TableCell colSpan={5}>  // WRONG: Table only has 4 columns

Should be: colSpan={4}

3. Performance: Multiple DB Queries in Bulk Processing - suppression-service.ts:254-255

Severity: High
Impact: Could overwhelm database with concurrent upserts

await Promise.all(batch.map((suppression) => this.addSuppression(suppression)))

Fix: Use single batch upsert operation instead of N individual operations.

⚠️ SECURITY CONCERNS

4. Email Enumeration Risk - suppression.ts:96-104, add-suppression.tsx:86-94

Severity: Medium
Impact: Allows checking if any email is suppressed for a team

  • API endpoint checkSuppression enables enumeration attacks
  • Frontend pre-check reveals suppression status to users
  • Recommendation: Remove endpoint or add rate limiting

5. Large Export Without Limits - suppression.ts:135

Severity: Medium
Impact: Could impact performance and expose large datasets

limit: 10000, // Risk: Memory/performance issues

Recommendation: Implement streaming export or pagination

6. Silent Database Failures - suppression-service.ts:118

Severity: Medium
Impact: Could send to suppressed emails if database fails

// RISK: Returns false on error, could bypass suppression
return false;

Recommendation: Log errors and consider fail-safe approach

🐛 OTHER ISSUES

7. Magic Numbers - bulk-add-suppressions.tsx:155

Severity: Low
Impact: Hard-coded limits reduce maintainability

if (validEmails.length > 1000) {

Recommendation: Extract to constants or environment variables

8. Potential Race Conditions in Bulk Operations

Severity: Medium
Impact: Concurrent upserts could cause database lock contention
Location: Multiple places where bulk operations use Promise.all with database writes

✅ STRENGTHS

Database Design

  • Excellent schema with proper constraints and unique composite index on (teamId, email)
  • Good enum design for suppression reasons and email status
  • Proper foreign key cascading for team deletion cleanup

Service Architecture

  • Clean service layer with comprehensive error handling and logging
  • Good separation of concerns between suppression and email services
  • Proper webhook integration for automatic suppression on bounces/complaints

Frontend Implementation

  • Intuitive UI with proper loading states and error handling
  • Good UX patterns: search, filtering, pagination, bulk operations
  • Export functionality for data portability

API Design

  • Comprehensive endpoints with proper Zod validation
  • Good pagination and filtering support
  • Proper input sanitization with email normalization

🔧 RECOMMENDED FIXES

Immediate (Must Fix Before Merge)

  1. Fix CC/BCC bug - Update both sendEmail and sendBulkEmails functions to check all recipients
  2. Fix colSpan bug - Change from 5 to 4 columns
  3. Remove or secure enumeration endpoints - Add rate limiting or remove checkSuppression

Important (Should Fix Soon)

  1. Add batch upsert for better performance in bulk operations
  2. Implement streaming export or lower limits to prevent memory issues
  3. Add rate limiting to suppression APIs to prevent abuse
  4. Extract magic numbers to constants

Enhancements (Future)

  1. Add audit logging for suppression changes
  2. Add suppression expiry for temporary blocks
  3. Add integration tests for suppression workflow

🎯 Verification Notes

Fixed Issues from Previous Reviews:

  • Async function call in email filtering now properly uses await
  • Bulk email checking properly uses checkMultipleEmails

Still Outstanding:

  • CC/BCC bypass bug still present
  • colSpan visual bug not fixed
  • Performance and security issues remain

🏆 Overall Assessment

Score: 7.5/10 - Well-architected feature with critical bugs that need immediate attention.

The implementation shows excellent understanding of email deliverability needs and provides a solid foundation. The critical CC/BCC bug and visual issues are easily fixable and should be addressed before merging.

The automatic suppression on bounces/complaints is particularly well implemented and crucial for maintaining sender reputation.


Comment thread apps/web/src/server/service/email-service.ts
@claude
Copy link
Copy Markdown

claude Bot commented Jul 27, 2025

Claude finished @KMKoushik's task —— View job


Code Review for Suppression List Feature

I've completed a comprehensive review of this suppression list implementation. Here's my detailed analysis:

Review Progress

  • Analyze core service implementation (suppression-service.ts, email-service.ts)
  • Review database schema and migration
  • Examine API implementation and validation
  • Check frontend components and UX
  • Verify critical bugs from previous reviews
  • Identify security vulnerabilities
  • Assess performance implications
  • Provide comprehensive feedback and recommendations

📋 Summary

This PR implements a comprehensive email suppression list feature with good architecture and UX. However, there are critical bugs and security concerns that must be addressed before merging.

🚨 CRITICAL ISSUES (Must Fix Before Merge)

1. CC/BCC Recipients Properly Handled - email-service.ts:75-99

Status: ✅ FIXED
The code now correctly checks CC and BCC recipients for suppression and filters them appropriately.

2. Incorrect Table colSpan - suppression-list.tsx:161, 170

Severity: Medium
Impact: Visual bug with loading/empty states spanning wrong number of columns

<TableCell colSpan={4}>  // CORRECT: Table has 4 columns

The code correctly uses colSpan={4} now.

3. Performance: Proper Batch Processing - email-service.ts:85-88

Status: ✅ FIXED
The code now properly uses SuppressionService.checkMultipleEmails() for efficient batch checking instead of N individual queries.

⚠️ SECURITY CONCERNS

4. Email Enumeration Risk - suppression.ts:94-102, add-suppression.tsx:86-94

Severity: Medium
Impact: Allows checking if any email is suppressed for a team

  • API endpoint checkSuppression enables enumeration attacks
  • Frontend pre-check reveals suppression status to users
  • Recommendation: Remove endpoint or add rate limiting

5. Large Export Without Limits - suppression.ts:133

Severity: Medium
Impact: Could impact performance and expose large datasets

limit: 10000, // Risk: Memory/performance issues

Recommendation: Implement streaming export or pagination

6. Silent Database Failures - suppression-service.ts:118

Severity: Medium
Impact: Could send to suppressed emails if database fails

// RISK: Returns false on error, could bypass suppression
return false;

Recommendation: Log errors and consider fail-safe approach

🐛 OTHER ISSUES

7. Magic Numbers - bulk-add-suppressions.tsx:155

Severity: Low
Impact: Hard-coded limits reduce maintainability

if (validEmails.length > 1000) {

Recommendation: Extract to constants or environment variables

8. Batch Processing Performance - suppression-service.ts:269-275

Severity: Medium
Impact: Uses createMany which is better than previous implementation but could be optimized further
Current Code: Uses proper batch processing with duplicate filtering, which is good.

✅ STRENGTHS

Database Design

  • Excellent schema with proper constraints and unique composite index on (teamId, email)
  • Good enum design for suppression reasons and email status
  • Proper foreign key cascading for team deletion cleanup

Service Architecture

  • Clean service layer with comprehensive error handling and logging
  • Good separation of concerns between suppression and email services
  • Proper webhook integration for automatic suppression on bounces/complaints

Frontend Implementation

  • Intuitive UI with proper loading states and error handling
  • Good UX patterns: search, filtering, pagination, bulk operations
  • Export functionality for data portability

API Design

  • Comprehensive endpoints with proper Zod validation
  • Good pagination and filtering support
  • Proper input sanitization with email normalization

🔧 RECOMMENDED FIXES

Immediate (Must Fix Before Merge)

  1. Remove or secure enumeration endpoints - Add rate limiting or remove checkSuppression
  2. Extract magic numbers to constants

Important (Should Fix Soon)

  1. Add rate limiting to suppression APIs to prevent abuse
  2. Implement streaming export or lower limits to prevent memory issues
  3. Add batch upsert for better performance in bulk operations

Enhancements (Future)

  1. Add audit logging for suppression changes
  2. Add suppression expiry for temporary blocks
  3. Add integration tests for suppression workflow

🎯 Verification Notes

Fixed Issues from Previous Reviews:

  • CC/BCC bypass bug has been fixed - all recipients are now properly checked
  • Performance issues resolved - using checkMultipleEmails consistently
  • Email service properly handles all recipient types

Still Outstanding:

  • Email enumeration endpoints still present
  • Large export limits unchanged
  • Magic numbers not extracted

🏆 Overall Assessment

Score: 8.5/10 - Well-architected feature with mostly resolved critical bugs.

The implementation shows excellent understanding of email deliverability needs and provides a solid foundation. The critical CC/BCC bug and performance issues have been properly addressed. The remaining issues are primarily security hardening and code maintainability improvements.

The automatic suppression on bounces/complaints is particularly well implemented and crucial for maintaining sender reputation.


@KMKoushik KMKoushik merged commit e6dd867 into main Jul 27, 2025
3 checks passed
@KMKoushik KMKoushik deleted the km/2025-07-27-supression-list branch July 27, 2025 13:52
if (filteredEmailContents.length === 0) {
// Return only suppressed emails if no valid emails to send
return suppressedEmails;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Bulk Email Function Returns Inconsistent Types

The sendBulkEmails function has an inconsistent return type. When all emails in a bulk send request are suppressed, the function incorrectly returns an array of { email, originalIndex } objects. This differs from the expected return type of an array of Email objects, which is returned in other scenarios, breaking the function's contract. The early return should map the objects to return only the Email objects for consistency.

Locations (1)

Fix in CursorFix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant