Configuring Mailer
Firstly, we must add the feature mailer
in Cargo.toml:
...
[dependencies]
kalgan = { version = "0.9.0", features = ["mailer"] }
And then we must set in our settings file the parameters of our SMTP server.
Let's see an example for Gmail SMTP Server:
...
mailer:
sender: John Doe <john.doe@gmail.com>
server: smtp.gmail.com
user: john.doe@gmail.com
password: my_password
...
Find a description of these fields in the table below:
mailer.sender |
Sender email address. |
---|---|
mailer.server |
IP/Domain of the SMTP Server. Port number can be specified with a colon. |
mailer.user |
User name of the SMTP Server. |
mailer.password |
User password of the SMTP Server. |
Be aware that while we're developing ( environment.is_prod: false
) any change made in these parameters is taken on the fly and there's no need to restart the app.