".
"\nMIME-Version: 1.0\n" .
"Content-Type: multipart/mixed; " .
"boundary=\"{$mime_boundary}\";\n".
"Content-Transfer-Encoding: 7bit\n\n";
$email_message .= "This is a multi-part message in MIME format.\n\n" .
"--{$mime_boundary}\n" .
"Content-Type: text/html\n";
$email_message .= $email_txt . "\n\n";
$fileatt = $attachment; // Path to the file
$token=strtok($attachment, $seperator);
$j=0;
while($token!==false) {
$start = strrpos($token, '/') > -1 ? strrpos($token, '/')+1 : 0;
$fileatt_name = substr($token, $start, strlen($token)); // Filename that will be used for the file as the attachment
$file = fopen($token,'rb');
$data = fread($file,filesize($token));
fclose($file);
$data = chunk_split(base64_encode($data));
$email_message .= "--{$mime_boundary}\n" .
"Content-Type: {$f_type[$j]};" .
" name=\"{$f_name[$j]}\";\n" .
"Content-Transfer-Encoding: base64\n" .
"Content-Disposition: attachment;\n\n" .
$data;
$token=strtok($seperator);
$j++;
}
$email_message .= "--{$mime_boundary}--\n";
// echo $email_message;die("*****************");
$ok = @mail($email_to, $email_subject, $email_message, $headers);
if($ok) {
echo '
We acknowledge with thanks the receipt of your paper. The suitability of your paper for external review will be determined by one of our editors within 2 weeks. If you do not receive any email from one of editors-in-chief within 2 weeks, kindly contact them via bmashayekhyf@yahoo.com and hvishki@yahoo.com.
Best wishes,
Editorial office