Skip to content

Instantly share code, notes, and snippets.

@pedro-vasconcelos
Created February 19, 2014 22:15
Show Gist options
  • Select an option

  • Save pedro-vasconcelos/9102823 to your computer and use it in GitHub Desktop.

Select an option

Save pedro-vasconcelos/9102823 to your computer and use it in GitHub Desktop.
Testar o swiftmail
<?php
require_once 'vendor/swiftmailer/swiftmailer/lib/swift_required.php';
$transport = Swift_SmtpTransport::newInstance('smtp.host.com', 25, 'tls')
->setUsername('')
->setPassword('');
$mailer = Swift_Mailer::newInstance($transport);
$message = Swift_Message::newInstance('Informação')
->setFrom("[email protected]")
->setTo("[email protected]")
->setBody(file_get_contents('app/upload/mail.html'), 'text/html');
$mailer->send($message);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment