Created
May 20, 2009 06:07
-
-
Save pdesterlich/114650 to your computer and use it in GitHub Desktop.
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
foreach ($aMail as $rMail) { | |
//Create the Transport | |
$transport = Swift_SmtpTransport::newInstance('smtp.gmail.com', 465, 'tls') | |
->setUsername('[email protected]') | |
->setPassword('SoftwareService'); | |
//Create the Mailer using your created Transport | |
$mailer = Swift_Mailer::newInstance($transport); | |
//Create a message | |
$message = Swift_Message::newInstance() | |
->setSubject($rMail['subj']) | |
->setFrom(array('[email protected]' => 'Elco Sistemi - Assistenza')) | |
->setTo($rMail['dest']) | |
->setBody($rMail['body']); | |
//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