07.04 php saved
xbase
Tags add more
 
Note
swift send email with SwiftEmail
  1. function _newuser_email($data)
  2. {             
  3.  
  4.   $this->Email->connection  = 'smtp'; // default and thus you don't have to specify it
  5.   $this->Email->smtp_host   = 'smtp.1and1.com';
  6.   $this->Email->smtp_type   = 'tls'
  7.   $this->Email->username    = 'jonathan@passionmansion.com';
  8.   $this->Email->password    = 'm3m0tyh';
  9.   $this->Email->to          = $data['User']['email'];
  10.   $this->Email->subject     = 'Account Validation';
  11.   $this->Email->replyTo     = 'noreply@passionmansion.com';
  12.   $this->Email->from        = 'Passion Mansion <noreply@passionmansion.com>';
  13.   $this->Email->template    = 'newuser';
  14.   $this->Email->sendAs   =   'both';
  15.  
  16.   // Set user information
  17.   $this->set('user', $data['User'])
  18.  
  19.   // Send Email
  20.   if ( $this->Email->send() ) {
  21.     echo 'yes'; die;
  22.   } else {
  23.     echo 'shit'; die;
  24.   }     
  25.  
  26. }
Parsed in 0.061 seconds, using GeSHi 1.0.7.14

Modify this Paste