Email-builder / grunt-email-builder

Build Emails from HTML / CSS code in grunt
Other
94 stars 14 forks source link

EmailTest does not seem to work at all #18

Closed iDVB closed 10 years ago

iDVB commented 10 years ago

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.

yargalot commented 10 years ago

Will look into it mate, thanks for the props!

yargalot commented 10 years ago

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
jeremypeter commented 10 years ago

It worked for me as well

iDVB commented 10 years ago

Werd. I don't get anything about email being sent at all.

Here is my GruntFile Task: GruntFile Task

and here is my output: nothing

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?

jeremypeter commented 10 years ago

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.

iDVB commented 10 years ago

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!

yargalot commented 10 years ago

No probs! I'll close the issue then!

blowsie commented 10 years ago

How does the emailTest work?

Do I need to configure some smtp settings somewhere?

jeremypeter commented 10 years ago

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.

blowsie commented 10 years ago

Maybe its running into issues with my network proxy, I don't receive any mails, will test from another network ASAP.

captcodemonkey commented 10 years ago

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"
      }
  });
yargalot commented 10 years ago

Not at the moment, its just user and pass for now. Can definitely make a method to pass through options though

jeremypeter commented 10 years ago

@captcodemonkey, as of version 2.0.2 you can now pass a transport option

yargalot commented 10 years ago

Nice man!