title: The resource doesn't support specified Http Verb
body: <p>I am trying to make a contact form for a static website hosted in an Azure blob.
  When I click submit I can see the following error in the Console.</p>
  
  <pre><code>Failed to load resource: the server responded with a status of 405 
  (The resource doesn't support specified Http Verb.)
  </code></pre>
  
  <p>I think the issue may be that I need to set up CORS for mailgun.</p>
  
  <p>However I don't know what values to put </p>
  
  <p><a href="https://i.stack.imgur.com/q3n8y.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q3n8y.gif" alt="enter image description here"></a></p>
  
  <p>Here is send.php code</p>
  
  <pre><code>&lt;?php
  if( isset($_POST) ){
  
      $postData = $_POST;
      $mailgun = sendMailgun($postData);
  
      if($mailgun) {
      echo "Great success.";
    } else {
      echo "Mailgun did not connect properly.";
    }
  }
  
  function sendMailgun($data) {
  
    $api_key = 'INSERT_API_KEY_HERE';
    $api_domain = 'INSERT_DOMAIN_HERE';
    $send_to = 'YOUR_EMAIL';
  
      // sumbission data
          $ipaddress = $_SERVER['REMOTE_ADDR'];
          $date = date('d/m/Y');
          $time = date('H:i:s');
  
      // form data
          $postcontent = $data['data'];
          $reply = $data['senderAddress'];  
  
    $messageBody = "&lt;p&gt;You have received a new message from the contact form on your website.&lt;/p&gt;
                  {$postcontent}
                  &lt;p&gt;This message was sent from the IP Address: {$ipaddress} on {$date} at {$time}&lt;/p&gt;";
  
    $config = array();
    $config['api_key'] = $api_key;
    $config['api_url'] = 'https://api.mailgun.net/v3/'.$api_domain.'/messages';
  
    $message = array();
    $message['from'] = $reply;
    $message['to'] = $send_to;
    $message['h:Reply-To'] = $reply;
    $message['subject'] = "New Message from your Mailgun Contact Form";
    $message['html'] = $messageBody;
  
    $curl = curl_init();
  
    curl_setopt($curl, CURLOPT_URL, $config['api_url']);
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    curl_setopt($curl, CURLOPT_USERPWD, "api:{$config['api_key']}");
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
    curl_setopt($curl, CURLOPT_POST, true); 
    curl_setopt($curl, CURLOPT_POSTFIELDS,$message);
  
    $result = curl_exec($curl);
    curl_close($curl);
    return $result;
  }
  ?&gt;
  </code></pre>
  
  <p>This question is a follow up from <a href="https://stackoverflow.com/questions/47842901/where-should-email-api-keys-be-stored-for-a-contact-form-in-an-azure-blob-websit">this question</a></p>
  
  <p>I have tried including the subdomain www in the api_domain.</p>