mailbox.onCreated
A mailbox was created through the API.
Fires when a mailbox is created through emailkit.mailboxes.create(), on providers that support it. Save the mailbox so your app knows the address exists.
hooks: {
mailbox: {
onCreated: async ({ emailDriver, mailbox }) => {
await prisma.appMailbox.create({
data: { emailDriver, email: mailbox.email, mailbox },
});
},
},
},
Payload
PropType
emailDriverstring
Type
stringmailboxMailbox
Type
Mailboxcontext?unknown
Type
unknown