Created
August 19, 2014 19:32
-
-
Save aymanfarhat/2333eadbb1f919fdb8d2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
$to = array('[email protected]'); | |
// setup Swift mailer parameters | |
$transport = Swift_SmtpTransport::newInstance( 'smtp.sendgrid.net', 465, 'ssl'); | |
$transport->setUsername('aymanfarhat '); | |
$transport->setPassword('mypass'); | |
$swift = Swift_Mailer::newInstance( $transport ); | |
// create a message (subject) | |
$message = new Swift_Message('testing swift mail'); | |
// attach the body of the email | |
$message->setFrom('[email protected]'); | |
$message->setBody( 'test test', 'text/html' ); | |
$message->setTo( $to ); | |
// send email | |
$swift->send($message); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment