docs/4.Email.md
# Email
## Templates
`Eye4web\ZfcUser\ForgotPassword` already includes email templates, but you are able to edit them to suit your needs.
### Overriding templates
[Click here to see the email template folder](https://github.com/Eye4web/Eye4webZfcUserForgotPassword/tree/master/view/email)
1. Add the folder `view/email/` to your Application.
2. Create the view files you'd like to override. Here is the complete list of view files:
1. `view/email/request-password.phtml`
#### Variables
The follow variables is passed to the email template:
* **$name** - full name of the receiver
* **$token** - token used to change the password
Example of usage
```php
Dear <?=$name?><br>
Here is your password token: <?=$token?>
```
## Transporter
### Creating your own transporter
If you want to create your own email transporter, it must implement `Eye4web\ZfcUser\ForgotPassword\Service\MailTransporterInterface`.
The interface has been taken directly from `Soflomo/Mail`.