COZYROC IMAP Connection Unable to Delete Emails from Gmail

COZYROC IMAP Connection Unable to Delete Emails from Gmail

COZYROC IMAP Connection Unable to Delete Emails from Gmail

Issue

When using the COZYROC IMAP Connection with Gmail:

  • Emails can be read successfully
  • Emails can be downloaded and opened
  • The Delete operation does not work
  • Messages remain in the mailbox after package execution

No explicit error may be thrown, but the email is not removed from Gmail.


Cause

This issue typically occurs due to one or both of the following:

  1. Gmail IMAP settings are not configured correctly for deletion behavior.
  2. The OAuth token file used by the COZYROC IMAP connection is expired or invalid.

Gmail may allow read access but restrict delete operations if authentication or IMAP settings are not properly configured.


Resolution

Step 1 – Verify Gmail IMAP Settings

  1. Log in to the Gmail account.
  2. Go to Settings → See all settings.
  3. Open the Forwarding and POP/IMAP tab.
  4. Ensure:
    • IMAP is Enabled
    • IMAP access is properly configured

  1. Click Save Changes.

Step 2 – Regenerate the OAuth Token File

  1. Open the COZYROC IMAP Connection Manager in SSIS.
  2. Re-authenticate the Gmail account.
  3. Regenerate the OAuth token file.
  4. Save the new token file.
  5. Re-run the SSIS package.

After regenerating the token file and verifying IMAP settings, the delete operation should work as expected.

    Book a Success Call

    Need Help?
    Evaluating COZYROC? --> Success Call
    Customers --> Submit a Ticket