Detect a non-functional email connection
The system detects and classifies a mailbox connection failure — OAuth grant revoked, IMAP/SMTP authentication failure, mailbox not found, quota exceeded — and notifies Admins.
When this happens: MailboxSyncJob or ChannelHealthCheckJob encounters a failure.
Step by step
- 1
Open
/admin/channels/email/{id}and sees theLastErrorCode,LastErrorMessageandLastSuccessfulSyncAt.MailboxSyncJob's next poll against *[email protected]* fails with an IMAP authentication error. ClassifiesImapAuthenticationFailedand recordsLastErrorMessage. SetsRequiresReauthimmediately — authentication failures don't wait for the 3-failure threshold. EasyCRM notifies Admins that the connection needs attention (FR-10).
Other paths
Transient failure
A single poll is rate-limited. State stays Active; three consecutive failures are required before moving to Error.
If something goes wrong
Mailbox deleted at the provider
Classifies MailboxNotFound. The Admin must disconnect the mailbox — reconnecting the same address is not possible.
Good to know
- Failures are classified into precise codes rather than a generic error.
- Each connection's health is independent — one degraded mailbox never blocks the others.