<?php
require 'vendor/autoload.php';
require 'lib/SendGrid.php';




			$message .= '<html><body>';
			$message .= '<table rules="all" style="border-color: #666;" cellpadding="10">';
			$message .= "<tr><td><strong>Name:</strong> </td><td> swaroop </td></tr>";
			$message .= "<tr><td><strong>Email:</strong> </td><td> swaroopmail.com </td></tr>";
			$message .= "<tr><td><strong>Phone:</strong> </td><td> 123456 </td></tr>";
			$message .= "<tr><td><strong>Subject:</strong> </td><td> test mail </td></tr>";
			$message .= "<tr><td><strong>Product & Service:</strong> </td><td> test mailing </td></tr>";
			$message .= "<tr><td><strong>Other Info:</strong> </td><td> test </td></tr>";
			
			$message .= "</table>";
			$message .= "</body></html>";
		 			
$sendgrid = new SendGrid('rajivatre', 'riddhi030304');			

$email = new SendGrid\Email();
$email
    ->addTo('igrowsolutions@gmail.com')
    //->addTo('bar@foo.com')
    ->setFrom('me@bar.com')
    ->setSubject('Subject goes here')
    ->setText('Hello World!')
    ->setHtml('<html><body>
    				<table rules="all" style="border-color: #666;" cellpadding="10">
    				<tr><td><strong>Name:</strong> </td><td> swaroop </td></tr>
    				<tr><td><strong>Email:</strong> </td><td> swaroopmail.com </td></tr>
    				<tr><td><strong>Phone:</strong> </td><td> 123456 </td></tr>
    				<tr><td><strong>Subject:</strong> </td><td> test mail </td></tr>
    				<tr><td><strong>Product & Service:</strong> </td><td> test mailing </td></tr>
    				<tr><td><strong>Other Info:</strong> </td><td> test </td></tr>
    				</table>
    				</body></html>       
    			  ')
;


$sendgrid->send($email);

if($sendgrid)
{
echo "mail sent";
}
else 
{
echo "mail not sent";
}

?>