Closed iDVB closed 10 years ago
Will look into it mate, thanks for the props!
Hey, So I just tested this and it seemed to work, can you post your machine? does the console come up with:
Sending test email to steven.jmiller@gmail.com
Message was accepted by gmail.com
It worked for me as well
Werd. I don't get anything about email being sent at all.
Here is my GruntFile Task:
and here is my output:
System: OSX 10.9.2 Node: v0.10.24 grunt-cli v0.1.13 grunt v0.4.4
Is there a dependency that I'm missing or specific settings?
It looks like it's not even recognizing emailTest
. Check your package.json
and make sure you have the latest version of grunt-email-builder: 2.0.0
. Then do an npm install
to make sure you have everything updated.
Rookie move. Sorry guys! "grunt-email-builder": "~1.5.5",
was what I had.
changed to "grunt-email-builder": "~2.0.0",
and now I'm goold!
Cheers!
No probs! I'll close the issue then!
How does the emailTest work?
Do I need to configure some smtp settings somewhere?
No you shouldn't need to any smtp settings. The documentation gives an example in the Options section. You just need to provide an email address and a subject line to the options.emailTest.email and options.emailTest.subject properties.
Here's kind of a full example:
emailBuilder: {
sendEmail: {
files: 'dest/index.html' : 'src/index.html',
options: {
emailTest: {
email: 'john.doe@example.com',
subject: 'Subject line goes here'
}
}
}
};
grunt.registerTask('mail', ['emailBuilder:sendEmail']);
So now when I run grunt mail
, it'll send an email to john.doe@example.com.
Maybe its running into issues with my network proxy, I don't receive any mails, will test from another network ASAP.
Is it possible to pass other auth methods to node mail through this? Say I want gmail for example:
var smtpTransport = nodemailer.createTransport("SMTP",{
auth: {
user: "gmail.user@gmail.com", // service is detected from the username
pass: "userpass"
}
});
Not at the moment, its just user and pass for now. Can definitely make a method to pass through options though
@captcodemonkey, as of version 2.0.2 you can now pass a transport option
Nice man!
BTW, LOVE this tool. Kudos. Everything works for me except the email test. No errors, but no email in gmail. Is there something nodemailer setup needed or something? Even made sure its not ending up in my spam box.