SHARE
TWEET

Untitled

a guest Jul 20th, 2017 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. require_once 'swift/lib/swift_required.php';
  2.  
  3.     $transport = Swift_SmtpTransport::newInstance('smtp.gmail.com', 465, 'ssl')
  4.       ->setUsername ('email@gmail.com')
  5.       ->setPassword ('password');
  6.  
  7.     $mailer = Swift_Mailer::newInstance($transport);
  8.  
  9.     $message = Swift_Message::newInstance('Weekly Hours')
  10.        ->setFrom (array('email@gmail.com' => 'My Name'))
  11.        ->setTo (array('email@hotmail.com' => 'Recipient'))
  12.        ->setSubject ('Weekly Hours')
  13.        ->setBody ('Test Message', 'text/html');
  14.  
  15.     $result = $mailer->send($message);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top