title: Angular 2 CORS using mail service(mialgun)
body: <p>I am using mailgun api to send mails from my test app. Whenever I am trying to send mail it gives me:</p>
  
  <pre><code>Request header field Authorization is not allowed by Access-Control-Allow-Headers in preflight response.
  </code></pre>
  
  <p>Funny thing is that when I enable CORS plugin in chrome it works fine, and mail are sent. What is wrong? i thought that CORS must be setted on server side ? So why chrome is blocking my request?</p>
  
  <p>use of code:</p>
  
  <pre><code>var requestHeaders = new Headers();
  requestHeaders.append('Authorization', 'Basic ' + this.mailgunApiKey);
  requestHeaders.append('Content-Type', 'application/x-www-form-urlencoded');
  this.http.request(new Request({
      method: RequestMethod.Post,
      url: 'https://api.mailgun.net/v3/' + this.mailgunUrl + '/messages',
      body: 'from=' + this.sourcePageMail + '&amp;to=' + recipient + '&amp;subject=' + subject + '&amp;text=' + message,
      headers: requestHeaders
    }))
    .subscribe(success =&gt; {
      console.log('SUCCESS -&gt; ' + JSON.stringify(success));
    }, error =&gt; {
      console.log('ERROR -&gt; ' + JSON.stringify(error));
    });
  </code></pre>