PHP code example of ruudk / postmark-bundle

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

    

ruudk / postmark-bundle example snippets


/**
 * @var \Ruudk\PostmarkBundle\Postmark\Postmark $postmark
 */
$postmark = $this->container->get('ruudk_postmark.postmark');

$message = $postmark->compose();
$message->addTo('[email protected]');
$message->setSubject('Subject');
$message->setTextBody('Body');
$message->setHtmlBody('Body');

$postmark->send($message);

$postmark->delayed()->send($message);

$postmark->enqueue($message1);
$postmark->enqueue($anotherMessage);

$postmark->send();

$message = $postmark->compose('AppBundle:Mail:email.html.twig', array(
    'name' => 'Ruud'
));
$message->addTo('[email protected]');

$postmark->send($message);
 php

// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new BCC\ResqueBundle\BCCResqueBundle(),
        new Ruudk\PostmarkBundle\RuudkPostmarkBundle(),
    );
}