mailbox.onDeleted
A mailbox was deleted or disconnected — clean up your records.
Fires when a mailbox is deleted through emailkit.mailboxes.delete(). Remove what you stored for it — the mailbox record and its auth.
hooks: {
mailbox: {
onDeleted: async ({ mailbox }) => {
await prisma.connectedMailbox.deleteMany({
where: { email: mailbox.email },
});
},
},
},
Payload
PropType
emailDriverstring
Type
stringmailboxMailbox
Type
Mailboxcontext?unknown
Type
unknown