IsSMTP(); $mail->Host = 'smtpout.secureserver.net'; $mail->Port = 465; $mail->SMTPAuth = true; $mail->Username = 'info@bsl.gov.sl'; $mail->Password = 'Bslinfo20191'; $mail->SMTPSecure = 'ssl'; $mail->Subject = stripslashes($subject); $mail->From = $mailfrom; $mail->FromName = $mailfrom; $mailto_array = explode(",", $mailto); for ($i = 0; $i < count($mailto_array); $i++) { if(trim($mailto_array[$i]) != "") { $mail->AddAddress($mailto_array[$i], ""); } } $mail->AddReplyTo($mailfrom); if (!ValidateEmail($mailfrom)) { $error .= "The specified email address is invalid!\n
"; } $prefix = rand(111111, 999999); $i = 0; while (list ($key, $val) = each ($_FILES)) { if ($_FILES[$key]['name'] != "" and file_exists($_FILES[$key]['tmp_name']) and $_FILES[$key]['size'] > 0) { $upload_DstName[$i] = $prefix . "_" . str_replace(" ", "_", $_FILES[$key]['name']); $upload_SrcName[$i] = $_FILES[$key]['name']; $upload_Size[$i] = ($_FILES[$key]['size']); $upload_Temp[$i] = ($_FILES[$key]['tmp_name']); $upload_URL[$i] = "$upload_folder/$upload_DstName[$i]"; $upload_FieldName[$i] = $key; } if ($upload_Size[$i] >= $max_filesize) { $error .= "The size of $key (file: $upload_SrcName[$i]) is bigger than the allowed " . $max_filesize/1024 . " Kbytes!\n"; } $i++; } if (!empty($error)) { $errorcode = file_get_contents($error_url); $replace = "##error##"; $errorcode = str_replace($replace, $error, $errorcode); echo $errorcode; exit; } $uploadfolder = basename($upload_folder); for ($i = 0; $i < count($upload_DstName); $i++) { $uploadFile = $uploadfolder . "/" . $upload_DstName[$i]; if (!is_dir(dirname($uploadFile))) { RecursiveMkdir(dirname($uploadFile)); } move_uploaded_file($upload_Temp[$i] , $uploadFile); chmod($uploadFile, 0644); $name = "$" . $upload_FieldName[$i]; $message = str_replace($name, $upload_URL[$i], $message); } $internalfields = array ("submit", "reset", "send", "filesize", "formid", "captcha_code", "recaptcha_challenge_field", "recaptcha_response_field", "g-recaptcha-response"); $message .= $eol; $message .= "IP Address : "; $message .= $_SERVER['REMOTE_ADDR']; $message .= $eol; $logdata = ''; foreach ($_POST as $key => $value) { if (!in_array(strtolower($key), $internalfields)) { if (!is_array($value)) { $message .= ucwords(str_replace("_", " ", $key)) . " : " . $value . $eol; } else { $message .= ucwords(str_replace("_", " ", $key)) . " : " . implode(",", $value) . $eol; } } } if (count($upload_SrcName) > 0) { $message .= "\nThe following files have been uploaded:\n"; for ($i = 0; $i < count($upload_SrcName); $i++) { $message .= $upload_SrcName[$i] . ": " . $upload_URL[$i] . "\n"; } } $mail->CharSet = 'ISO-8859-1'; $mail->WordWrap = 80; $mail->Body = $message; if (!$mail->Send()) { die('PHPMailer error: ' . $mail->ErrorInfo); } header('Location: '.$success_url); exit; } ?> Feedback
Accessibility
Disclaimer
WAMZ Meeting Registration
2018 Bank of Sierra Leone. All rights reserved
©
Contact Us
Links
Today :
BUSINESS AREAS
WAMZ Meeting
BANK OF SIERRA LEONE

Personal Info (1 of 3)

Flight Details (2 of 3)

Reservation (3 of 3)