PHP code example of tparcina / qsendgridbundle

1. Go to this page and download the library: Download tparcina/qsendgridbundle 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/ */

    

tparcina / qsendgridbundle example snippets


$qs = $this->get('qalliance.qsendgrid');

$result = $qs->send('[email protected]', 'My Subject', '<h1>This is a QSendgrid test email.</h1>');

$attachmentUrls = [
	'./assets/attachments/sample1.jpg',
	'./assets/attachments/sample2.jpg'
];


$qs = $this->get('qalliance.qsendgrid');

$result = $qs->send('[email protected]', 'My Subject', '<h1>This is a QSendgrid test email with attachments.</h1>', $attachmentUrls);

$qs = $this->get('qalliance.qsendgrid');

$result = $qs->send('[email protected]', 'My Subject', '<h1>This is a QSendgrid test email.</h1>', null, 'From Name');
 
$qs = $this->get('qalliance.qsendgrid');

$result = $qs->sendWithTextPlain('[email protected]', 'My Subject', '<h1>This is a QSendgrid test email with plain text.</h1>', 'This is a QSendgrid test email with plain text', null, 'From Name');
AppKernel.php