PHP code example of fazland / notifire

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

    

fazland / notifire example snippets


Notifire::create();



$dispatcher = new EventDispatcher();

$builder = NotifireBuilder::create()
    ->setDispatcher($dispatcher)
;

$builder->addHandler(new SwiftMailerHandler($mailer, 'mailer_one'));
$builder->addNotification('email', Email::class);

$builder->initialize();

// Use 'mailer_one' handler to send this message
$email = Notifire::email('mailer_one');

$email
    ->addFrom('[email protected]')
    ->addTo('[email protected]')
    ->setSubject('Only wonderful E-mails with Notifire!')
    ->addPart(Part::create($body, 'text/html'))
    ->send()
;