Skip to content

Instantly share code, notes, and snippets.

@cam-gists
Created December 26, 2012 22:13
Show Gist options
  • Save cam-gists/4383488 to your computer and use it in GitHub Desktop.
Save cam-gists/4383488 to your computer and use it in GitHub Desktop.
PHP: PEAR swiftmailer
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('help@valuationvision.com' => '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('help@valuationvision.com'); // 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