jo selvfølgelig
///////////////////////////////////
$subject_array = array();
$recipient_array = array();
///////////////////////////////////
$recipient_array["modtager1"] = "min@mail.dk";
$recipient_array["modtager2"] = "min2@mail.dk";
if ($_POST['send'] == 'true') {
$to = $_POST['to'];
$name = $_POST['name'];
$cpr = $_POST['cpr'];
$lb = $_POST['lb'];
$adresse = $_POST['adresse'];
$postnummer = $_POST['postnummer'];
$by = $_POST['by'];
$email = $_POST['email'];
$the_subject = $_POST['subject'];
$OrderType = $_POST['OrderType'];
$OrderType2 = $_POST['OrderType2'];
$telefon = $_POST['telefon'];
$message = $_POST['message'];
if (($name == '') OR ($email == '')) {
$SendMail .= "<div class='red''>";
$SendMail .= "<img src='
http://www.mitdomaene.dk/images/obs.jpg' alt='Advarsel' /> Et af de obligatoriske felter er ikke udfyldt.<br />";
$SendMail .= "</div>";
}
elseif (ereg('([[:alnum:].-]+)(@[[:alnum:].-]+.+)', $email)) {
$the_subject = "Bestilling";
$to = "min@mail.dk";
$recipient = $to;
$subject = $the_subject;
$additional_headers = "Fra: $email";
$body = "Navn: $name \rAdresse: $adresse \rPostnummer: $postnummer \rBy: $by \rEmail: $email \rTelefon: $telefon \rProdukt: $OrderType\rOrdretype: $OrderType2 \rBesked: $message";
$additional_headers = 'From: webmaster@mitdomaene.dk' . "\r\n" .
'Reply-To: webmaster@domaene.dk' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
if (mail($recipient, $subject, $body, $additional_headers)) {
$SendMail .= "<div class='red'>";
$SendMail .= "Din bestilling er afsendt!";
$SendMail .= "</div>";
$name="";
$adresse="";
$postnummer="";
$by="";
$email="";
$OrderType = "";
$OrderType2 = "";
$telefon="";
$message="";
} else {
$SendMail .= "<div class='red'>";
$SendMail .= "Der er desværre opstået en fejl i afsendelsen! Prøv venligst igen.<br>";
$SendMail .= "</div>";
$send = "false";
}
} else {
$SendMail .= "<div class='red'>";
$SendMail .= "Email adressen der er angivet (".$email.") er ikke en korrekt email adresse. Prøv venligst igen.<br>";
$SendMail .= "</div>";
$send = "false";
}
}
$SendMail .= "<div class = 'emailform'>";
$SendMail .= "<form name = 'EmailForm' method = 'post' action=''>";
$SendMail .= "<input type='hidden' name='send' value='true'>";
$SendMail .= "Benyt nedenstående formular til at foretage bestilling<hr>";
$SendMail .= "Dit navn:<br>";
$SendMail .= "<div class='red'><input type='text' size='40' name='name' value=".$name.">*</div>";
$SendMail .= "Adresse:<div class='red'><input type='text' size='40' name='adresse' value=".$adresse.">*</div>";
$SendMail .= "Postnummer og By:<div class='red'><input type='text' size='4' name='postnummer' value=".$postnummer."> <input type='text' name='by' value=".$by.">*</div>";
$SendMail .= "Din e-mail adresse:<br>";
$SendMail .= "<div class='red'><input type='text' name='email' size='40' value=".$email.">*</div><div class='sub'>Indtast en gyldig e-mail adresse som De kan modtage e-mail på.</div>";
$Sendmail .= "<p class='sub'>";
$SendMail .= "Telefon:<br>";
$SendMail .= "<input type='text' name='telefon' size='10' value=".$telefon."><br><hr>Vælg produkttype<br><br>";
if ($_GET["id"] == "70")
$SendMail .= "<input type='radio' value='produkt1' checked name='OrderType' ID='Type1'><b>produkt1</b><br>";
$SendMail .= "<input type='radio' value='produkt2' name='OrderType' ID='Radio11'><b>produkt2</b><br>";
$SendMail .= "<input type='radio' value='produkt3' name='OrderType' ID='Radio12'><b>produkt3</b><br>";
$SendMail .= "<input type='radio' value='produkt4' name='OrderType' ID='Radio12'><b>produkt4</b><br><hr>";
$SendMail .= "<br>Evt. bemærkninger:<br>";
$SendMail .= "<textarea cols='40' rows='5' name='message'>".$message."</textarea><br><br>";
$SendMail .= "<input type='submit' class='button' value='Send'> ";
$SendMail .= "<input type='reset' class='button' value='Slet'>";
$SendMail .= "</form>";
$SendMail .= "</div>";
return $SendMail;