Hi,
I followed these steps but couldn't succeed. Can anybody pls help.
Step 1) Created an email connector called Email as follows :
"Email": {
"name": "Email",
"defaultForType": "mail",
"connector": "mail",
"transports": [
{
"type": "SMTP",
"secure": true,
"port": 465,
"auth": {
"pass": "abc"
}
}
]
}
Step 2) Added entry in model-config.json as follows:
"Email": {
"dataSource": "Email"
},
Step 3) In User.js added following function :
module.exports = function(User) {
User.sendEmail = function() {
User.app.models.Email.send({
subject: 'my subject',
text: 'my text',
html: 'my <em>html</em>'
}, function(err, mail) {
console.log('email sent!');
cb(err);
});
}
};
When server is up, I am not seeing mail getting sent. Can anybody please help me ?
Thanks.