Skip to content
Playground(another site)

bynk.email.duplicate_handler

Error A from email service declares more than one on message handler; it has exactly one.

A from email service claims one address and decides each message it is given, so it has exactly one on message handler. To treat two addresses differently, declare two services, each with its own address.

Example

service support from email("[email protected]") {
on message(mail: InboundEmail) -> Effect[EmailVerdict] { Accept }
on message(mail: InboundEmail) -> Effect[EmailVerdict] { Accept } // ✗ a second handler
}
service support from email("[email protected]") {
on message(mail: InboundEmail) -> Effect[EmailVerdict] { Accept } // ✓ one handler
}

In the Book

See also

  • Every code in its category, Other, on the diagnostic index.
  • bynk explain bynk.email.duplicate_handler shows the same from the installed toolchain, without a network.