Skip to content

Instantly share code, notes, and snippets.

@permatis
Created April 27, 2015 05:18
Show Gist options
  • Save permatis/b921af501e206f0a476a to your computer and use it in GitHub Desktop.
Save permatis/b921af501e206f0a476a to your computer and use it in GitHub Desktop.
Create setting SwiftMailer in Slim Framework.
$app->mailer = function () {
$transport = Swift_SmtpTransport::newInstance('smtp.gmail.com', '465', 'ssl')
->setUsername('[email protected]')
->setPassword('password');
$mailer = Swift_Mailer::newInstance($transport);
return $mailer;
};
$mailer = $app->mailer;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment