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
"; } if (!empty($error)) { $errorcode = file_get_contents($error_url); $replace = "##error##"; $errorcode = str_replace($replace, $error, $errorcode); echo $errorcode; exit; } $internalfields = array ("submit", "reset", "send", "filesize", "formid", "captcha_code", "recaptcha_challenge_field", "recaptcha_response_field", "g-recaptcha-response"); $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; } } } $mail->CharSet = 'ISO-8859-1'; if (!empty($_FILES)) { foreach ($_FILES as $key => $value) { if ($_FILES[$key]['error'] == 0 && $_FILES[$key]['size'] <= $max_filesize) { $mail->AddAttachment($_FILES[$key]['tmp_name'], $_FILES[$key]['name']); } } } $mail->WordWrap = 80; $mail->Body = $message; if (!$mail->Send()) { die('PHPMailer error: ' . $mail->ErrorInfo); } header('Location: '.$success_url); exit; } ?> Sponsor a Show
Hotline
215-475-2100