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; } $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; $logdata = ''; foreach ($_POST as $key => $value) { if (!in_array(strtolower($key), $internalfields)) { $logdata .= ','; if (!is_array($value)) { $message .= ucwords(str_replace("_", " ", $key)) . " : " . $value . $eol; $value = str_replace(",", " ", $value); $logdata .= $value; } else { $message .= ucwords(str_replace("_", " ", $key)) . " : " . implode(",", $value) . $eol; $logdata .= implode("|", $value); } } } $logdata = str_replace("\r", "", $logdata); $logdata = str_replace("\n", " ", $logdata); $logdata .= "\r\n"; $handle = fopen($csvFile, 'a') or die("can't open file"); $logtime = date("Y-m-d H:i:s,"); fwrite($handle, $logtime); fwrite($handle, $logdata); fclose($handle); 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); } $mail->ClearAddresses(); $mail->ClearAttachments(); $mail->Subject = stripslashes($autoresponder_subject); $mail->From = $autoresponder_from; $mail->FromName = $autoresponder_from; $mail->AddAddress($autoresponder_to, ""); $mail->AddReplyTo($autoresponder_from); foreach ($_POST as $key => $value) { if (!in_array(strtolower($key), $internalfields)) { if (!is_array($value)) { $autoresponder_message .= ucwords(str_replace("_", " ", $key)) . " : " . $value . $eol; } else { $autoresponder_message .= ucwords(str_replace("_", " ", $key)) . " : " . implode(",", $value) . $eol; } } } $mail->IsHTML(false); $mail->WordWrap = 80; $mail->Body = $autoresponder_message; if (!$mail->Send()) { die('PHPMailer error: ' . $mail->ErrorInfo); } header('Location: '.$success_url); exit; } ?> Contact

Contact

Ivar Rmer
Sjoelplein 1
9951 DA Winsum

Stel hier je vraag, of geef een reactie.

Je bericht:

Achternaam:

Naam:

E-mail:

Venus Webdesign

Ivar Rmer: 06-53340235

Kvk:  01158581
Btw: 1057.11.779 B01

NL42 TRIO 0786 7066 27
I.P. Rmer, Winsum

Ivar Rmer: www.ivarromer.nl