In this assignment, you're going to use a Dapr output binding in the FineCollectionService to send an email.
Dapr offers the bindings building block to easily interface with external systems. Bindings are divided into input bindings and output bindings. Input bindings can trigger your services by picking up events from external systems. Output bindings are an easy way to invoke functionality of some external system. Both input and output bindings do this without you as a developer having to learn the API or SDK of the external system. You only need to know the Dapr bindings API. See below for a diagram of how output bindings work:
For this hands-on assignment, this is all you need to know about output bindings. If you want to get more detailed information, read the introduction to this building block in the Dapr documentation. In the next assignment, you will also use a Dapr input binding.
To complete this assignment, you must reach the following goals:
- The FineCollectionService uses the Dapr SMTP output binding to send an email.
- The SMTP binding calls a development SMTP server that runs as part of the solution in a Docker container.
This assignment targets number 4 in the end-state setup:
Open the source code folder in VS Code. Then open the Bindings documentation and start hacking away. You can use MailDev for the development SMTP server.
To get step-by-step instructions to achieve the goals, open the step-by-step instructions:
Make sure you stop all running processes and close all the terminal windows in VS Code before proceeding to the next assignment.
Go to assignment 6.