Привет. Помогите , Что нужно добавить в PHP код, чтобы резюме отправлялось как вложение *(Письмо приходит в виде текста) Код (PHP): /* Send email */ //if( isset($_POST['dat_form']) && !empty($_POST) && $_POST['dat_form'] === 'that_is') { if( isset($_POST['dat_form']) && $_POST['dat_form'] == 'that_is') { $form_data = $_POST; //print_r($form_data); $texts = array( // step 1 __('Position applied for') => 'pos_for', __('Full name') => 'full_name', __('Gender') => 'gender', __('Marital status') => 'martial_status', __('Date of birth') => 'birth_day', __('Month of birth') => 'birth_month', __('Year of birth') => 'birth_year', __('Country of birth') => 'birth_country', __('City of birth') => 'birth_city', __('Citizenship') => 'citizenship', __('Nationally') => 'nationally', __('Present Address') => 'present_address', __('Passport No') => 'passport', __('Phone number') => 'phone_num', __('Mobile') => 'mobile', __('E-mail') => 'email', __('Uploaded Photo') => 'upload', // step 2 __('Job title') => 'job_title', __('Company name') => 'company_name', __('Time period from') => 'from_period', __('to ') => 'to_period', __('Worked Country') => 'worked_country', __('Worked City') => 'worked_city', __('Responsibility') => 'responsibility', __('Reference Name') => 'reference_name', __('Reference Occupation') => 'reference_occupation', __('Reference phone') => 'reference_phone', __('Internship organization') => 'internship_organization', __('Internship department') => 'internship_department', // step 3 __('Education dates from') => 'from_edu_date', __(' to ') => 'to_edu_date', __('Education degree') => 'edu_degree', __('Faculty/Speciality') => 'faculty_and_speciality', __('Name/type of organisation') => 'type_of_organization', __('Education Country') => 'edu_country', __('Education City') => 'edu_city', __('Training & certifications dates from') => 'from_training_date', __(' to ') => 'to_training_date', __('Title of Qualification awarded') => 'award', __('Name of Organisation providing training') => 'training', __('Training Country') => 'training_country', __('Training City') => 'training_city', // step 4 __('Languages') => 'lang', __('Computer skills') => 'comp_skill', __('Work-related personal qualities') => 'personal_qualities', __('Interests') => 'interests', ); $data = array(); $message = ''; foreach($form_data as $name => $value) { //if($name === 'dat_form') continue; if(is_string($value) && !empty($value) && $value !== 0 ) { $value = stripslashes(trim($value)); if($key = array_search($name, $texts)) { $message .= "{$key} : {$value} <br>"; } } elseif(is_array($value) && !empty($value)) { for($n=$k=0; count($value) > $n; $n++) { if( empty($value[$n]) ) continue; if($key2 = array_search($name, $texts)) { //if($n === 0) { $message .= "{$key2} : "; } $message .= "{$key2} : {$value[$n]} <br>"; } } } } //echo $message; $to = array('example@example.com'); $subject = __('example Application Form Applied'); $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n"; $headers .= 'From: ' . $subject . ' <no-reply@example.com/>' . "\r\n"; wp_mail( $to, $subject, $message, $headers , $attachment ); die(' success'); } // end of send form /* Pagination */ function pagination($pages = '', $range = 4) { $showitems = ($range * 2)+1; global $paged; if(empty($paged)) $paged = 1; if($pages == '') { global $wp_query; $pages = $wp_query->max_num_pages; if(!$pages) { $pages = 1; } } if(1 != $pages) { $pages_for_loop = ($pages > 8) ? 8 : $pages; //echo $pages; for ($i=1; $i < $pages_for_loop; $i++) {} $img = get_stylesheet_directory_uri() . '/img/pagination_border.png'; //style=\"background: url('$img') right 1px no-repeat; if($paged != $i) echo '[url="' . get_pagenum_link($paged + 1) . '"]next[/url]'; echo "<span>Page ".$paged." of ".$pages."</span>"; if($paged != 1) echo '[url="' . get_pagenum_link($paged - 1) . '"]prev[/url]'; _________________________________________________________________________ Письмо приходит в виде текста Position applied for : test Full name : testv Gender : male Marital status : single Present Address : testtesttest Phone number : 5555555 Mobile : 555555555 E-mail : example@example.com Job title : test Company name : test Time period from : 11.11.11 to : 11.11.11 Education dates from : 11.11.11 to : 11.11.11 Education degree : test Faculty/Speciality : test Name/type of organisation : test Languages : test Computer skills : test