".
"\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 the editor-in-chief within 2 weeks, kindly contact him via moslehian@yahoo.com .
Best wishes,
Editorial office
';
die();
} else {
die("Sorry but the email could not be sent. Please go back and try again!");
}
}
$atu_name=$_POST['atu_name'];
$title=$_POST['title'];
$fname=$_POST['fname'];
$lname=$_POST['lname'];
$country=$_POST['country'];
$degree=$_POST['degree'];
$email=$_POST['email'];
$tel=$_POST['tel'];
$sug_editor=$_POST['sug_editor'];
$scope=$_POST['scope'];
$ref_name1=$_POST['ref_name1'];
$ref_con1=$_POST['ref_con1'];
$ref_mail1=$_POST['ref_mail1'];
$ref_name2=$_POST['ref_name2'];
$ref_con2=$_POST['ref_con2'];
$ref_mail2=$_POST['ref_mail2'];
$ref_name3=$_POST['ref_name3'];
$ref_con3=$_POST['ref_con3'];
$ref_mail3=$_POST['ref_mail3'];
$ref_name4=$_POST['ref_name4'];
$ref_con4=$_POST['ref_con4'];
$ref_mail4=$_POST['ref_mail4'];
$Confirmation=$_POST['Confirmation'];
$BJMA=$_POST['BJMA'];
$body = '*Corresponding author:'.$atu_name.' *(Country Code)(City Code)(Tel):'.$tel.' *Title:'.$title.'
-------------------------------------------- Author(s) ';
for($i=0,$j=1;$i<10;$i++,$j++){
if($fname[$i]){
$body.=$j.'- Full First name:'.$fname[$i].' Full Last name:'.$lname[$i].' Country:'.$country[$i].' Last academic degree:'.$degree[$i].' Email:'.$email[$i].' ';
}
}
$body.='-------------------------------------------- Suggested editor:'.$sug_editor." ";
if ($scope){
$body.='