-2
Notice: Array to string Conversion in C: Uwamp www Site processa.php on line 29
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<?php
$titulo = $_POST['titulo'];
$nome = $_POST['nome'];
$email = $_POST['email'];
$mensagem = $_POST['mensagem'];
require 'vendor/autoload.php';
$from = new SendGrid\Email(null, $email);
$subject = "Confirmar email";
$to = new SendGrid\Email(null, "[email protected]");
$content = new SendGrid\Content("text/html", "Olá, Equipe de suporte do Fusion.<br><br>$titulo<br>Nome: $nome<br>Email: $email<br> Mensagem: $mensagem");
$mail = new SendGrid\Mail($from, $subject, $to, $content);
//Necessário inserir a chave
$apiKey = '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';
$sg = new \SendGrid($apiKey);
$response = $sg->client->mail()->send()->post($mail);
echo $response->statusCode();
echo $response->headers();
echo $response->body();
?>
</body>
</html>