Created
February 18, 2017 06:44
-
-
Save phpfour/4c3b8ae1659721cd0b983275e4b65fc1 to your computer and use it in GitHub Desktop.
Symfony Email Test Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Symfony\Component\Debug\Debug; | |
$loader = require_once __DIR__.'/../app/bootstrap.php.cache'; | |
Debug::enable(); | |
require_once __DIR__.'/../app/AppKernel.php'; | |
$kernel = new AppKernel('dev', true); | |
$kernel->loadClassCache(); | |
$kernel->boot(); | |
$mailer = $kernel->getContainer()->get('mailer'); | |
$message = \Swift_Message::newInstance() | |
->setSubject('Test Email') | |
->setFrom('emran.hasan@gmail.com') | |
->setTo('test@gmail.com') | |
->setBody('This is a test email.', 'text/html'); | |
$mailer->send($message); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment