The goal of a service is to store reusable functions. An `email` service could be useful, if we plan to send emails from different functions in our codebase:
// Return a promise of the function that sends the email.
return transporter.sendMail(options);
}
};
```
> Note: please make sure you installed `nodemailer` (`npm install nodemailer`) for this example.
The service is now available through the `strapi.services` global variable. We can use it in another part of our codebase. For example a controller like below: