I'm using sendGrid to send emails. But my emails goes in spam folder. Here is code that I'm using for this.
<?php
$apiKey = "xxxxx.xxxxxx.xxxxxx";
require("sendgrid-php/sendgrid-php.php");
$from = new SendGrid\Email("Example User", "azeemhaider77@gmail.com");
$subject = "Sending with SendGrid is Fun";
$to = new SendGrid\Email("Example User", "axeemhaider@gmail.com");
$content = new SendGrid\Content("text/plain", "and easy to do anywhere, even with PHP");
$mail = new SendGrid\Mail($from, $subject, $to, $content);
$sg = new \SendGrid($apiKey);
$response = $sg->client->mail()->send()->post($mail);
echo $response->statusCode();
var_dump($response->headers());
var_dump($response->body());
Why this is not working why these emails move into spam folder ?