question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

mailgun support defaulting to jade, ignoring "custom engine"

See original GitHub issue

Error on attempt to send

{ [Error: ENOENT: no such file or directory, open '/Users/justin/Source/RiseVision/rise-web/templates/emails/enquiry-notification/email.jade']
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/Users/justin/Source/RiseVision/rise-web/templates/emails/enquiry-notification/email.jade' }

keystone.js file

    'sass': 'public',
    'static': 'public',
    'favicon': 'public/images/favicon.ico',
    'views': 'templates/views',
    'view engine': 'hbs',

    'custom engine': handlebars.create({
        layoutsDir: 'templates/views/layouts',
        partialsDir: 'templates/views/partials',
        defaultLayout: 'default',
        helpers: new require('./templates/views/helpers')(),
        extname: '.hbs'
    }).engine,

    'emails': 'templates/emails',

    'auto update': true,
    'session': true,
    'auth': true,
    'user model': 'User'

});

// Load your project's Models

keystone.import('models');

// Setup common locals for your templates. The following are required for the
// bundled templates and layouts. Any runtime locals (that should be set uniquely
// for each request) should be added to ./routes/middleware.js

keystone.set('locals', {
    _: require('underscore'),
    env: keystone.get('env'),
    utils: keystone.utils,
    editable: keystone.content.editable
});

// Load your project's Routes

keystone.set('routes', require('./routes'));


// Setup common locals for your emails. The following are required by Keystone's
// default email templates, you may remove them if you're using your own.

keystone.set('email locals', {
    logo_src: '/images/logo-email.gif',
    logo_width: 194,
    logo_height: 76,
    theme: {
        email_bg: '#f9f9f9',
        link_color: '#2697de',
        buttons: {
            color: '#fff',
            background_color: '#2697de',
            border_color: '#1a7cb7'
        }
    }
});

keystone.set('email transport', 'mailgun');
keystone.set('mailgun api key', process.env.MAILGUN_API_KEY );
keystone.set('mailgun domain', process.env.MAILGUN_DOMAIN );

repo: https://github.com/risevision/rise-web

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
justindonnarumacommented, May 6, 2016

@w01fgang I’m on master currently.

0reactions
mxstbrcommented, May 6, 2016

Since this issue seems resolved, I’ll close it!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mailgun Help Center
Mailgun Help Center · Account Management · How Do I Downgrade My Account? How To Adjust The Message Retention Settings · Can I...
Read more >
FAQ — Mailgun API documentation
By default we give you one shared IP address. If you would like a dedicated IP ... You have a custom domain defined...
Read more >
Email Best Practices — Mailgun API documentation
This guide is a brief summary of email best practices that we have learned from managing mail servers for thousands of customers and...
Read more >
How To Adjust The Message Retention Settings
By default, all accounts have their Message Retention settings set to 3 days. This can be adjusted (or disabled) in the Domain settings......
Read more >
Contact Support | Mailgun
Contact us! Learn how Mailgun can optimize your email deliverability, increase your click-through rate and protect your reputation. Get a free demo!
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found