Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $separator = (uniqid(time()));
- $headers .= "Content-Type: multipart/mixed; boundary=$separator" . "n";
- $body = "--$separatorn";
- $body .= "Content-type: text/html; charset=UTF-8n"; // кодировка письма
- $body .= "Content-Transfer-Encoding: 8bitnn";
- $body .="Привет. <br>Здесь можно использовать текст в формате <b>HTML</b> <br> "; // и т.д.
- for ($j=0;$j<count($files); $j++)
- {
- $file=$path_file."soc_price".$files[$j].".zip";
- $body.= "--$separatorn";
- $filetype= mime_content_type($file);
- $body.= "Content-Type: "$filetype"; name==?utf-8?B?".base64_encode("soc_price".$files[$j].".zip")."?=n";
- $body.= "Content-Transfer-Encoding: base64n";
- $body.= "Content-Disposition: attachment; filename==?utf-8?B?".base64_encode("soc_price".$files[$j].".zip")."?=nn";
- $body.= chunk_split(base64_encode(file_get_contents($file)))."n";
- }
- }
- $body.= "--".$separator ."--n";
Add Comment
Please, Sign In to add comment