Skip to content
This repository was archived by the owner on Nov 24, 2021. It is now read-only.

No console output using 'node mail' #32

@matissev

Description

@matissev

Hi,
I am having troubles making this helper work.
I followed the instructions on this page but when I run node mail the console outputs nothing and no mail is sent.
It seems that I configured everything properly, mailgun included (apikey, server url, authorized recipients).
Here is my code :

var email = require('keystone-email');
require('dotenv').config();

new email('mail.pug', {
	transport: 'mailgun',
}).send({
	apiKey: process.env.APIKEY,
	domain: process.env.MAILGUN_URL,
	to: process.env.MAIL_RECEIVER,
	from: {
		name: 'Website',
		email: 'website@mail.com',
	},
	subject: 'Your first KeystoneJS email',
}, function (err, result) {
	if (err) {
		console.error('🤕 Mailgun test failed with error:\n', err);
	} else {
		console.log('📬 Successfully sent Mailgun test with result:\n', result);
	}
});

Any hint on this one?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions