public function send_a_contact() { $profile_email = trim($_REQUEST['profile_email']); $profile_name = trim($_REQUEST['profile_name']); $c_name = trim($_REQUEST['c_name']); $c_email = trim($_REQUEST['c_email']); $c_phone = trim($_REQUEST['c_phone']); $c_message = trim($_REQUEST['c_message']); $send_copy = $_REQUEST['send_copy']; if (trim($_REQUEST['c_subject']) != '') { $subject = trim($_REQUEST['c_subject']) . ' ' . people_ict_t__('Email Inquiry - from', __('from', 'cup_cp')) . ' ' . (function_exists('icl_t') ? icl_t('WP', __('Blog Title', 'wpml-string-translation'), get_option('blogname')) : get_option('blogname')); } else { $subject = people_ict_t__('Email Inquiry - Contact from', __('Contact from', 'cup_cp')) . ' ' . (function_exists('icl_t') ? icl_t('WP', __('Blog Title', 'wpml-string-translation'), get_option('blogname')) : get_option('blogname')); } $profile_data = array('subject' => $subject, 'to_email' => $profile_email, 'profile_name' => $profile_name, 'profile_email' => $profile_email, 'contact_name' => $c_name, 'contact_email' => $c_email, 'contact_phone' => $c_phone, 'message' => $c_message); $email_result = People_Contact_Functions::contact_to_people($profile_data, $send_copy); echo $email_result; die; }