Last active
December 29, 2015 13:49
-
-
Save ptasker/7679992 to your computer and use it in GitHub Desktop.
Mailgun setup
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 | |
require_once 'swiftmailer/lib/swift_required.php'; | |
// Create the Transport | |
$transport = Swift_SmtpTransport::newInstance ( 'smtp.mailgun.org', 25 ) | |
->setUsername ( 'username@domain.com' ) | |
->setPassword ( 'rand0mpa55' ); | |
//Helps for sending mail locally during development | |
$transport->setLocalDomain ( '[127.0.0.1]' ); | |
// Create the Mailer using your created Transport | |
$mailer = Swift_Mailer::newInstance ( $transport ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment