PHP code example of gylaandrij / swiftmailer-mailgun-bundle
1. Go to this page and download the library: Download gylaandrij/swiftmailer-mailgun-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/ */
gylaandrij / swiftmailer-mailgun-bundle example snippets
new cspoo\Swiftmailer\MailgunBundle\cspooSwiftmailerMailgunBundle(),
$message = \Swift_Message::newInstance()
->setSubject('Hello Email')
->setFrom('[email protected]')
->setTo('[email protected]')
->setBody(
$this->renderView(
'HelloBundle:Hello:email.txt.twig',
array('name' => $name)
)
)
;
$this->container->get('mailer')->send($message);