Last active
September 13, 2018 22:52
-
-
Save Deep21/aa7d4e8d724b41b2fd874df2bcaab675 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
$transport = new Swift_SmtpTransport('smtp.gmail.com', 465, "ssl"); | |
$transport | |
->setUsername("<your email>") | |
->setPassword("<your password>"); | |
$mailer = new Swift_Mailer($transport); | |
$message = new Swift_Message(); | |
$message->setSubject('Votre facture') | |
->setFrom(['<from>' => 'Test']) | |
->setTo(['<to rcpt>' => 'Test']) | |
->setBody("<h1>OK</h1>", 'text/html'); | |
$result = $mailer->send($message); | |
dump($result); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment