Last active
September 28, 2015 00:18
-
-
Save rwheaton/1355392 to your computer and use it in GitHub Desktop.
swiftmailer test
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
<? | |
require_once '/Users/larry/hp/vendors/SwiftMailer/swift_required.php'; | |
//require_once '/home/ryan/Documents/code/houseparty/houseparty/vendors/SwiftMailer/swift_required.php'; | |
//Create the Transport | |
$transport = Swift_SmtpTransport::newInstance('XX.XX.XX.XX', 25); | |
//Create the Mailer using your created Transport | |
$mailer = Swift_Mailer::newInstance($transport); | |
//Create a message | |
$message = Swift_Message::newInstance('Hi how are you') | |
->setFrom(array('[email protected]' => 'rtw')) | |
->setTo(array('[email protected]', '[email protected]' => 'Ryan W')) | |
->setBody('Here is the message itself') | |
; | |
//Send the message | |
$result = $mailer->send($message); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment