Table of contents
Setting up authentication with SMTP
VEVA supports authentication when the "Standard SMTP mail sender" service is used to send e-mail.
NOTE: This applies to version 2022.11.03.1 and newer
For security reasons, the user/pass information is stored in the appsettings.json file on the website root, and cannot be viewed/edited in the e-mail settings UI in VEVA where other mail settings are configured. The syntax of the configuration in the appsettings.json file needs to be as follows:
{
.......
"MailKit": {
"UserName": "
"Password": "
}
}
This will apply authentication information for any e-mail which is being sent. In some cases it might be required to specify different authentication information depending on the from address which is specified when e-mails are sent. To do that, it's possible to prefix the UserName/Password keys with the from address, like so:
{
.......
"MailKit": {
"foo@foo.is_UserName": "
"foo@foo.is_Password": "
}
}
With this config, no authorization is used when sending mail, except when the from address is foo@foo.is
It's also possible to combine the keys to specify a default UserName/Password for all e-mail, which is then overridden for certain from addresses:
{
.......
"MailKit": {
"UserName": "mydefaultusername",
"Password": "mydefaultpassword"
"foo@foo.is_UserName": "usernameforthisfromaddress",
"foo@foo.is_Password": "passwordforthisfromaddress"
}
}
Example configuration
Example configuration
The appsettings.json keys should be as follows:
{
........
"MailKit": {
"haukurh@advania.is_UserName": "yoursmtpusername",
"haukurh@advania.is_Password": "yoursmtppassword"
}
}