In this recipe, we will show how the Email Transport can be used to send e-mails. We will first implement a business service, which sends a message to a given e-mail address. The e-mail address is hardcoded in the endpoint of the business service.
In order to make the sending more flexible, we will also show how to use the Transport Headers action to dynamically set the e-mail address, the subject, and the mail body in a proxy service, before invoking the business service.
Make sure that the mail server is installed and configured as shown in the Using Email Transport to consume e-mails recipe.