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

No console output using 'node mail' #32

Open
matissev opened this issue Aug 15, 2017 · 1 comment
Open

No console output using 'node mail' #32

matissev opened this issue Aug 15, 2017 · 1 comment

Comments

@matissev
Copy link

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: '[email protected]',
	},
	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?

@jare0590
Copy link

Hi @matissev maybe you should try putting in .send something like this:

.send({}, {
...
}, function

:)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants