Configuration for one mailbox mapping built via MailboxMappingBuilder, pairing a custom app's verify and store email callbacks. A repository app registers these through its controller mapping list to receive incoming email for a website domain: it verifies an incoming address against each enabled mapping and, on a match, builds a MailboxResource that runs this mapping's store callback.
Properties
| Property | Returns | Description |
|---|---|---|
| emailDisabled | boolean | Whether this mailbox mapping is disabled, in which case incoming mail is never checked against it. This is the negation of the enabled flag passed to MailboxMappingBuilder.enabled. |
| mappingList | ControllerMappingList | The controller mapping list of the app that created this mailbox mapping. Used to execute the verify and store callbacks via its executeJs method; never null. |
| storeMail | Object | The callback invoked to store or handle a captured email once an incoming address has been verified. This is either the name of a controller method as a string, or a JS function object, as passed to MailboxMappingBuilder.storeMail, and is run via the mapping list's executeJs. May be null if no store callback was configured. |
| verifyMailbox | Object | The callback invoked to test whether an incoming email address is handled by this mailbox mapping. This is either the name of a controller method as a string, or a JS function object, as passed to MailboxMappingBuilder.verifyMailbox, and is expected to return a boolean when run via the mapping list's executeJs. May be null if no verify callback was configured. |
Methods
isEmailDisabled()
Returns: boolean
Whether this mailbox mapping is disabled, in which case incoming mail is never checked against it. This is the negation of the enabled flag passed to MailboxMappingBuilder.enabled.
getStoreMail()
Returns: Object
The callback invoked to store or handle a captured email once an incoming address has been verified. This is either the name of a controller method as a string, or a JS function object, as passed to MailboxMappingBuilder.storeMail, and is run via the mapping list's executeJs. May be null if no store callback was configured.
getMappingList()
Returns: ControllerMappingList
The controller mapping list of the app that created this mailbox mapping. Used to execute the verify and store callbacks via its executeJs method; never null.
getVerifyMailbox()
Returns: Object
The callback invoked to test whether an incoming email address is handled by this mailbox mapping. This is either the name of a controller method as a string, or a JS function object, as passed to MailboxMappingBuilder.verifyMailbox, and is expected to return a boolean when run via the mapping list's executeJs. May be null if no verify callback was configured.
getMailbox(MailboxAddress add)
Returns: Mailbox
Resolves the website that owns the given address's domain and, if it is a website root folder, builds a mailbox resource for it backed by this mapping's store callback.
| Parameter | Description |
|---|---|
add | the mailbox address to resolve a mailbox for |