Example #1
0
 private function __sendReminderMail($email_address)
 {
     $from = Configure::read('RentSquare.supportemail');
     $email = new CakeEmail();
     $email->domain('rentsquaredev.com');
     $email->sender('*****@*****.**', 'RentSquare Support');
     $email->template('reminder', 'generic')->emailFormat('html')->from(array($from => 'RentSquare Support'))->to($email_address)->subject('RentSquare Signup Reminder')->send();
     return true;
 }
Example #2
0
 private function __sendPaymentSuccess($email_address, $email_data)
 {
     $from = Configure::read('RentSquare.supportemail');
     $email = new CakeEmail();
     $email->config('default');
     $email->domain('rentsquaredev.com');
     $email->sender('*****@*****.**', 'RentSquare Support');
     $email->template('monthlyfeesuccess', 'generic')->emailFormat('html')->from(array($from => 'RentSquare Support'))->to($email_address)->subject('RentSquare Payment Receipt')->viewVars(array('email_data' => $email_data))->send();
     return true;
 }
Example #3
0
 private function __SendContactUsEmail($data)
 {
     $from = Configure::read('RentSquare.supportemail');
     try {
         $email = new CakeEmail();
         $email->domain('rentsquaredev.com');
         $email->sender('*****@*****.**', 'RentSquare Support');
         $email->template('contactus', 'generic')->emailFormat('html')->from(array($from => 'RentSquare Support'))->to('*****@*****.**')->subject('RentSquare Inquiry')->viewVars(array('data' => $data))->send();
     } catch (Exception $e) {
         return false;
     }
     return true;
 }
Example #4
0
 public static function accountCompleteMail($user)
 {
     App::uses('CakeEmail', 'Network/Email');
     $email = new CakeEmail();
     $email->config('default');
     $email->domain('nativecamp.net');
     $email->emailFormat('text');
     $email->template('account_complete');
     $email->viewVars(array('name' => $user['nickname']));
     $email->to($user['email']);
     $email->from('*****@*****.**', 'NativeCamp運営事務局');
     $email->replyTo('*****@*****.**');
     $email->returnPath('*****@*****.**', 'NativeCamp運営事務局');
     #    $email->subject(__('Account Activation').' - '.Configure::read('my.site_name'));
     $email->subject("ネイティブキャンプ:事前登録完了メール");
     $email->send();
 }
Example #5
0
 private function __sendRentLateReminderMail($email_address, $data)
 {
     $from = Configure::read('RentSquare.supportemail');
     try {
         $email = new CakeEmail();
         $email->domain('rentsquaredev.com');
         $email->sender('*****@*****.**', 'RentSquare Support');
         $result = $email->template('rentlate', 'generic')->emailFormat('html')->from(array($from => 'RentSquare Support'))->to($email_address)->subject('Rent Late Reminder - RentSquare')->viewVars(array('unit_num' => $data['unit_num'], 'rent_due' => $data['rent_due'], 'first_name' => $data['first_name'], 'billing_start' => $data['billing_end'], 'billing_end' => $data['rent_period'], 'property_name' => $data['property_name']))->send();
     } catch (Exception $e) {
         return false;
     }
     return true;
 }
 private function __sendMessageNotification($convId = null, $userIds = null, $fromUser = null, $title = null, $message = null)
 {
     $this->loadModel('User');
     $from = Configure::read('RentSquare.supportemail');
     $sender = $this->User->findById($fromUser);
     $sender_name = $sender['User']['first_name'] . ' ' . $sender['User']['last_name'];
     $user_ids = array();
     //If Conversation already exists
     if ($convId != null) {
         $this->loadModel('ConversationsUser');
         $users = $this->ConversationsUser->find('all', array('conditions' => array('ConversationsUser.conversation_id' => $convId), 'fields' => array('user_id')));
         foreach ($users as $user) {
             array_push($user_ids, $user["ConversationsUser"]['user_id']);
         }
     } else {
         $user_ids = $userIds;
     }
     //send email to each user if they have the send email notification checked
     foreach ($user_ids as $user_id) {
         if ($user_id != $fromUser) {
             $this->User->contain();
             $user = $this->User->findById($user_id);
             if ($user['User']['email_for_messages']) {
                 try {
                     $email = new CakeEmail();
                     $email->domain('rentsquaredev.com');
                     $email->sender('*****@*****.**', 'RentSquare Support');
                     $email->template('newmessagenotification', 'generic')->emailFormat('html')->from(array($from => 'RentSquare Support'))->to($user['User']['email'])->subject('New Message - RentSquare')->viewVars(array('fromUser' => $sender_name, 'title' => $title, 'message' => $message))->send();
                 } catch (Exception $e) {
                     //return false;
                 }
             }
         }
     }
     return true;
 }
 private function __sendMaintenanceNotification($data, $user_details, $ticket_id)
 {
     $from = Configure::read('RentSquare.supportemail');
     $emailTo = "";
     foreach ($user_details as $property_manager) {
         $emailTo = $property_manager['Property']['Manager']['email'] . ', ';
     }
     $emailTo = rtrim($emailTo, ', ');
     try {
         $email = new CakeEmail();
         $email->domain('rentsquaredev.com');
         $email->sender('*****@*****.**', 'RentSquare Support');
         $email->template('newmaintenance', 'generic')->emailFormat('html')->from(array($from => 'RentSquare Support'))->to($emailTo)->subject('New Maintenance Ticket - RentSquare')->viewVars(array('data' => $data, 'user_details' => $user_details, 'ticket_id' => $ticket_id))->send();
     } catch (Exception $e) {
         return false;
     }
     return true;
 }
 private function __sendRentReminderManual($emailTo, $message, $unit_number, $rent_due, $payment_id, $first_name, $billing_start, $billing_end, $rent_period)
 {
     $from = Configure::read('RentSquare.supportemail');
     try {
         $email = new CakeEmail();
         $email->domain('rentsquaredev.com');
         $email->sender('*****@*****.**', 'RentSquare Support');
         $email->template('manualreminder', 'generic')->emailFormat('html')->from(array($from => 'RentSquare Support'))->to(trim($emailTo))->subject('RentSquare Rent Reminder')->viewVars(array('message' => $message, 'unit_number' => $unit_number, 'rent_due' => $rent_due, 'payment_id' => $payment_id, 'first_name' => $first_name, 'billing_start' => $billing_start, 'billing_end' => $billing_end, 'rent_period' => $rent_period))->send();
     } catch (Exception $e) {
         return false;
     }
     return true;
 }
Example #9
0
 private function __sendPropertyActivation($prop_data)
 {
     $from = Configure::read('RentSquare.supportemail');
     try {
         $email = new CakeEmail();
         $email->domain('rentsquaredev.com');
         $email->sender('*****@*****.**', 'RentSquare Support');
         $email->template('approveproperty', 'generic')->emailFormat('html')->from(array($from => 'RentSquare Support'))->to($prop_data['Manager']['email'])->subject('Property Approved')->viewVars(array('prop_data' => $prop_data))->send();
     } catch (Exception $e) {
         return false;
     }
     return true;
 }
Example #10
0
 private function __NotifyTenantOfApproval($emailTo, $unit_num, $tenant_name, $property_name)
 {
     $from = Configure::read('RentSquare.supportemail');
     try {
         $email = new CakeEmail();
         $email->domain('rentsquaredev.com');
         $email->sender('*****@*****.**', 'RentSquare Support');
         $email->template('residentapproved', 'generic')->emailFormat('html')->from(array($from => 'RentSquare Support'))->to($emailTo)->subject('Welcome to RentSquare!')->viewVars(array('tenant_name' => $tenant_name, 'unit_num' => $unit_num, 'property_name' => $property_name))->send();
     } catch (Exception $e) {
         return false;
     }
     return true;
 }
Example #11
0
 private function __sendTenantInvite($emailTo, $passwd, $user_id, $property, $unit_num)
 {
     $from = Configure::read('RentSquare.supportemail');
     $this->loadModel('Unit');
     $user_det = $this->User->findById($user_id);
     try {
         $email = new CakeEmail();
         $email->domain('rentsquaredev.com');
         $email->sender('*****@*****.**', 'RentSquare Support');
         $email->template('inviteresident', 'generic')->emailFormat('html')->from(array($from => 'RentSquare Support'))->to($emailTo)->subject('You have been invited to use RentSquare')->viewVars(array('user_details' => $user_det, 'property' => $property, 'unit_num' => $unit_num, 'emailAdd' => $emailTo, 'passwd' => $passwd))->send();
     } catch (Exception $e) {
         return false;
     }
     return true;
 }