PHP do Azure do Sendgrid

Eu sou um novato em php, azure e sendgrid.

Aqui está um código que descobri que estou tentando usar para o formulário html.

<!-- BEGINNING OF CONTACT FORM -->
<div class="section-page-landing" id="contact">
			<div class="inner-section">
				<div class="contain">
					<center><h2>Contact Me</h2>
<form class="contact" action="a_test_mailer_processor.php" method="post">
<p>Name:</p> <!-- Can choose to customize form.html inputs starting here as needed, but be sure to reference any changes in mailer.php post fields-->
<input type="text" name="name" />
 <p>E-mail:</p>
<input type="text" name="email" />
<p>Subject:</p>
<input type="text" name="subject" />
<p>Message:</p>
<textarea name="message" syle="width: 45%; text-align: center;">Please leave a short message here</textarea></p>
<input class="send" type="submit" value="Send"> <!-- Send button-->
</form></center>
				</div>
			</div>
		</div>
		<!--end contact form-->

Aqui está o PHP que estou tentando usar

Atualizei o código da seguinte maneira, trocando minhas credenciais e endereço de email. Sem erros, mas ainda não está funcionando para mim. Existe algo mais que eu possa testar?

<?php

ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
var_dump(function_exists('curl_version'));

$url = 'https://api.sendgrid.com/';
$user = 'MYSENDGRIDUSERNAME';
$pass = 'MYSENDGRIDPASSWORD';

$params = array(
    'api_user'  => $user,
    'api_key'   => $pass,
    'to'        => 'MYEMAILADDRESS',
    'subject'   => 'testing from curl',
    'html'      => 'testing body',
    'text'      => 'testing body',
    'from'      => 'MYEMAILADDRESS',
  );


$request =  $url.'api/mail.send.json';

// Generate curl request
$session = curl_init($request);
// Tell curl to use HTTP POST
curl_setopt ($session, CURLOPT_POST, true);
// Tell curl that this is the body of the POST
curl_setopt ($session, CURLOPT_POSTFIELDS, $params);
// Tell curl not to return headers, but do return the response
curl_setopt($session, CURLOPT_HEADER, false);
// Tell PHP not to use SSLv3 (instead opting for TLS)
curl_setopt($session, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2);
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);

// obtain response
$response = curl_exec($session);
curl_close($session);

// print everything out
print_r($response);

?> 

E aqui estão os erros que estou recebendo. bool (true) Aviso: Variável indefinida: enrolar em D: \ home \ site \ wwwroot \ a_test_mailer_processor.php na linha 36 Aviso: curl_setopt () espera que o parâmetro 1 seja recurso, nulo dado em D: \ home \ site \ wwwroot \ a_test_mailer_processor.php na linha 36

Eu tentei simplesmente remover a linha 36, curl_setopt ($ curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2); e os erros foram interrompidos, mas o formulário ainda não foi enviado / recebido. Deixe-me saber o que estou fazendo de errado.

questionAnswers(1)

yourAnswerToTheQuestion