title: Nodemailer with Gmail service not working on heroku
body: <p>I've got a basic email setup done for sending an email using Nodemailer with AngularJS and NodeJS and I've got the project deployed on heroku.</p>
  <p>The emailing seems to be working just fine when I am running the app on heroku, but when I get it deployed to Heroku no emails are sent.</p>
  <p>For authentication, I am using a Gmail address and I also have a <code>bcc</code> to another Gmail address. So <code>from</code> and <code>bcc</code> addresses are two different Gmail addresses. The <code>from</code> address is the same as the address used for authentication.</p>
  <p>Could somebody help me with resolving this issue?</p>
  <p><strong>Edit: Adding code</strong></p>
  <pre><code>var nodemailer = require('nodemailer');
  var transporter = nodemailer.createTransport({
      service: 'Gmail',
      auth: {
          user: 'foobar@gmail.com',
          pass: 'foobar'
      }
  });
  
  router.post('/send',function(req,res){
  
      var mailOptions = {
          from: 'Foo Bar ✔ &lt;foobar@gmail.com&gt;',
          to: req.body.email,
          subject: &quot;Hello &quot; + req.body.email,
          text: 'Hello ' + req.body.email + '✔',
          html: &quot;&lt;p&gt;Hello &quot; + req.body.email + &quot; &lt;/p&gt;&quot;,
          bcc: &quot;fred@gmail.com&quot;
      };
      transporter.sendMail(mailOptions, function(error, info){
          if(error){
              console.log(error);
          }else{
              console.log('Message sent: ' + info.response);
              res.send(200);
          }
      });        
  });
  </code></pre>