", "From: ".$from."" ); $msg = CF_AR_Email::abr_email_template_1($fname,$lname,$dob,$caddres,$chomphon,$cworpho,$email,$rname,$rphone,$remail,$laplifor,$comm_str,$montbegn,$bedromned,$paddres,$pphone); CF_AR_Email::abr_send_email($to,$from,'Application Form',$msg,$headers); $response=array( 'response' =>1, 'message' =>'Email sent successfully', ); }*/ if($act=='favemail'){ $sname = $_POST['sname']; $sname = $sname?sanitize_text_field($sname):$sname=''; $semail = $_POST['semail']; $semail = $semail?sanitize_email($semail):$semail=''; $message = $_POST['message']; $message = $message?$message:$message=''; $remail1 = $_POST['remail1']; $remail1 = $remail1?sanitize_email($remail1):$remail1=''; $remail2 = $_POST['remail2']; $remail2 = $remail2?sanitize_email($remail2):$remail2=''; $remail3 = $_POST['remail3']; $remail3 = $remail3?sanitize_email($remail3):$remail3=''; $remail4 = $_POST['remail4']; $remail4 = $remail4?sanitize_email($remail4):$remail4=''; $remail5 = $_POST['remail5']; $remail5 = $remail5?sanitize_email($remail5):$remail5=''; $email_subject = $_POST['email_subject']; $email_subject = $email_subject?sanitize_text_field($email_subject):$email_subject=''; $admin = get_option("admin_email"); $headers = array( "Reply-To: ".$sname." <".$semail." >", "From: ".$sname."" ); $multiple_recipients = array($admin,$remail1,$remail2,$remail3,$remail4,$remail5,$semail); $msg = CF_AR_Email::abr_email_template_2($message,$semail,$sname); if(CF_AR_Email::abr_send_email($multiple_recipients,$email_subject,$msg,$headers)){ $response=array( 'response' => 1, 'message'=>'Email sent successfully', ); } else{ $response=array( 'response' => 0, 'message'=>'Email could not sent !', ); } } } echo json_encode($response); die(); } public static function abr_send_email($to,$subject,$message,$headers){ $response = wp_mail($to,$subject,$message,$headers); remove_filter('wp_mail_content_type','abr_email_content_type'); return $response; } public static function abr_email_content_type(){ return 'text/html'; } public function abr_email_template_1($fname,$lname,$dob,$caddres,$chomphon,$cworpho,$email,$rname,$rphone,$remail,$laplifor,$comm,$montbegn,$bedromned,$paddres,$pphone){ ob_start(); $o = ob_get_contents(); ?>Application

Application

  • Name:
  • Date of Birth:
  • Current Address:
  • Current Home Phone:
  • Current Work Phone:
  • Email:
  • Roommate's Name:
  • Roommate's Phone:
  • Roommate's Email:
  • Location / Property Applying For:
  • Units you are interested in:
  • Lease Would Begin On:
  • Number of Bedrooms Needed:
  • Permanent Address:
  • Permanent Phone:

Warm regards,

Email favorites to your friends

Email favorites to your friends

Hello:

Warm regards,