Fluent builder for a mailbox mapping, letting a custom app capture incoming email for its website domain. Obtained from the app's controller mapping list via mailboxController, configured with a verify callback that decides whether an incoming address belongs to this mailbox and a store callback that handles a captured message, then finished with build to register the mapping. For example: controllerMappings.mailboxController().enabled(true) .verifyMailbox('verifyMailbox').storeMail('storeMail').build().

Group: Builders


Methods

enabled(boolean enabled)

Returns: MailboxMappingBuilder

Enables or disables this mailbox mapping. A disabled mapping is skipped when the platform checks incoming mail against it.

ParameterDescription
enabledtrue to enable this mapping, false to disable it

storeMail(String storemail)

Returns: MailboxMappingBuilder

Sets the name of the controller method to call to store or handle a captured email once it has passed verification.

ParameterDescription
storemailthe name of the controller method to invoke to store the email

storeMail(VarArgFunction storemail)

Returns: MailboxMappingBuilder

Sets a JS function to execute to store or handle a captured email once it has passed verification.

ParameterDescription
storemailthe JS function to invoke to store the email

verifyMailbox(String verifyMailbox)

Returns: MailboxMappingBuilder

Sets the name of the controller method to call to verify that an incoming email address is handled by this mailbox. The method is called with the incoming address and should return a boolean.

ParameterDescription
verifyMailboxthe name of the controller method that verifies the incoming address

verifyMailbox(VarArgFunction verifyMailbox)

Returns: MailboxMappingBuilder

Sets the JS function to execute to verify that an incoming email address is handled by this mailbox. The function is called with the incoming address and should return a boolean.

ParameterDescription
verifyMailboxthe JS function that verifies the incoming address

build()

Returns: MailboxMapping

Builds the mailbox mapping from the enabled flag and verify/store callbacks configured on this builder, and registers it with the app's controller mapping list unless engine initialisation has already completed.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.