PHP code example of angelpm9506 / sendgritpapiinterface
1. Go to this page and download the library: Download angelpm9506/sendgritpapiinterface library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
angelpm9506 / sendgritpapiinterface example snippets
use NDD_send_connect\NDD_send_connect;
$apikey = 'tu-api-key || Token';
$urlBase = "https://baseurle.test"; // url a que se comunicara
$isToken = false; // si es un token en lugar deuna apikey lo que se esta implementando
$sendConnect = new NDD_send_connect($apikey, $urlBase, isToken);
use NDD_send_connect_php56\NDD_send_connect_php56;
$apikey = 'tu-api-key || Token';
$urlBase = "https://baseurle.test"; // url a la que se comunicara
$isToken = false; // si es un token se coloca en true
$sendConnect = new NDD_send_connect_php56($apikey, $urlBase, isToken);
$from = '[email protected]';
$to = '[email protected]';
$cc = '[email protected]'; // opcional y puede ser null
$bcc = '[email protected]'; // opcional y puede ser null
$subject = 'Asunto del correo';
$html = '<p>Contenido del correo en HTML</p>';
$text = 'Contenido del correo en texto plano';
$responseByApikey = $sendgrid->send_email($from, $to, $subject, $cc, $bcc, $html, $text);
$responseByToken = $sendgrid->send_email_token($from, $to, $subject, $cc, $bcc, $html, $text);
print_r($responseByApikey);
print_r($responseByToken);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.