Email Template in Loopback

132 views
Skip to first unread message

Nafis Hasnian

unread,
Apr 22, 2017, 4:44:11 PM4/22/17
to LoopbackJS
I followed this tutorial
https://github.com/strongloop/loopback-example-user-management

l but it sends me an email at 0.0.0.0 .
How do i change it to my ip or domain? I don't see anything on the routes that defines that! 

Nafis Hasnian

unread,
Apr 22, 2017, 4:46:29 PM4/22/17
to LoopbackJS
I want to change my template 

Cesar Ho

unread,
Apr 23, 2017, 12:20:52 PM4/23/17
to LoopbackJS
Nafis,

I provide the actual server address to the verify's options. Don't know whether this is the suggested answer from Loopback, but this works for me.

    var options = {
      type: 'email',
      to: 'xxxxx',
      from: xx...@xxx.com',
      subject: 'Thanks for registering.',
      template: path.resolve(__dirname, '../../server/views/verify.ejs'),
      protocol: process.env.PROTOCOL || 'http',
      port: process.env.DISPLAY_PORT || 3000,
      host: process.env.HOSTNAME || 'localhost',
      redirect: '/verified',
    };

Philippe Corrèges

unread,
Apr 10, 2019, 11:41:52 AM4/10/19
to LoopbackJS
Hello,

Does someone know  if there is a better way of doing this?


Hardcoding this is not ok for me.

Thanks and Regards,
Reply all
Reply to author
Forward
0 new messages