How to setup SMTP server with loopback.io mbaas? i have gone through all the documentation but i couldn\'t find it. How to give/define my smtp server settings in loopback config
The STMP transport can be configured in the datasources.json, for example:
"mail": {
"defaultForType": "mail",
"connector": "mail",
"transports": [ {
type: 'SMTP',
host: "smtp.gmail.com", // hostname
secureConnection: true, // use SSL
port: 465, // port for secure SMTP
auth: {
user: "gmail.user@gmail.com",
pass: "userpass"
}
}
]
},
Or:
app.models.email.setupTransport({
type: 'SMTP',
host: "smtp.gmail.com", // hostname
secureConnection: true, // use SSL
port: 465, // port for secure SMTP
auth: {
user: "gmail.user@gmail.com",
pass: "userpass"
}
});