Created
December 26, 2012 22:13
-
-
Save cam-gists/4383488 to your computer and use it in GitHub Desktop.
PHP: PEAR swiftmailer
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
require_once 'swift_required.php'; | |
// Mailer Config | |
$transport = Swift_MailTransport::newInstance(); | |
// Message Setup | |
$message = Swift_Message::newInstance() | |
->setSubject('You now have access to Dropbox') | |
->setFrom(array('[email protected]' => 'Valuation Vision')) | |
->setTo(array($client_data->email => $client_data->firstname.' '.$client_data->lastname)) | |
->setBody('You now have access to Dropbox on Valuation Vision'.$share['body']->url) | |
// Optional Template | |
->addPart('<q>You now have access to Dropbox '.$share['body']->url.'</q>', 'text/html') | |
->setReturnPath('[email protected]'); // ADD DATA | |
// Send the email | |
$mailer = Swift_Mailer::newInstance($transport); | |
$mailer->send($message); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment