title: Meteor deploy - MAIL_URL not being set
body: <p>I recently started deploying a meteor app off of my local machine and it seems that the MAIL_URL property is not being set when deploying to a *.meteor.com domain. No matter what I have tried the email is sent via the default MailGun </p>
  
  <p>What I have tried so far.</p>
  
  <ol>
  <li>Verified that process.MAIL_URL is set and works locally - ensures
  that I am setting MAIL_URL correctly </li>
  <li>Verified that process.MAIL_URL
  is set on *.meteor.com domain by checking meteor logs - ensures that
  the process.env settings are being set on *.meteor.com </li>
  <li>Tried multiple *.meteor.com domains - ensures it was not a subdomain specific
  issue </li>
  <li>Tried multiple smtp providers: gmail and Mandrill - ensures
  that it was not an issue with the smtp provider </li>
  <li>Tried creating a simple app with a simple test email button - ensures problem was not
  related to my app code</li>
  </ol>
  
  <p>Nothing works. With the simple app, my code is the following:</p>
  
  <pre><code>if (Meteor.isClient) {
    Template.hello.greeting = function () {
      return "Welcome to testmail.";
    };
  
    Template.hello.events({
      'click input' : function () {
        console.log("calling send mail");
        Meteor.call('sendEmail',
              'xxx@gmail.com',
              'xxx@domain.com',
              'Hello from Meteor!',
              'This is a test of Email.send.');           
      }
    });
  }
  
  if (Meteor.isServer) {
  // In your server code: define a method that the client can call
  Meteor.methods({
    sendEmail: function (to, from, subject, text) {
      check([to, from, subject, text], [String]);
  
      // Let other method calls from the same client start running,
      // without waiting for the email sending to complete.
      this.unblock();
  
      Email.send({
        to: to,
        from: from,
        subject: subject,
        text: text
      });
    }
  });
    Meteor.startup(function () {
      // code to run on server at startup
      process.env.MAIL_URL = 'smtp://blahblah:token@smtp.mandrillapp.com:587/';      
      console.log(process.env);
    });
  }
  </code></pre>
  
  <p>I am out of ideas at this point. Has anybody else experience this before and what was the resolution? Thanks.</p>