Send email

$data = @$_POST;

$err = array();
if(!empty($_POST)){

	if(empty($_POST["your_name"])){
		$err["your_name"] = true;
	}
 
	if(empty($_POST["your_email"])){
		$err["your_email"] = true;
	}

	if(empty($_POST["your_subject"])){
		$err["your_subject"] = true;
	}
 
	if(empty($_POST["your_message"])){
		$err["your_message"] = true;
	}

 
	if(empty($err)){
		$your_name = strip_tags($_POST["your_name"]);
		$your_company = strip_tags($_POST["your_company"]);
		$your_phone = strip_tags($_POST["your_phone"]);
		$your_email = strip_tags($_POST["your_email"]);
		$your_subject = strip_tags($_POST["your_subject"]);
		$your_message = strip_tags($_POST["your_message"]);
 
		$caption = "Contactformulier";
		$admin_email = get_option("admin_email");
 
		ob_start();
		include("template-contact-mail.php");
		$mail_content = ob_get_contents();
		ob_end_clean() ;
 
		$headers = 'Content-Type: text/html; charset=UTF-8'.'\r\n';
		$headers .= 'From: '.$your_name.' <'.$your_email.'>' . "\r\n";
 
		$success = wp_mail($admin_email, $caption, $mail_content, $headers);

		header("Location: ".get_permalink(PAGE_ID_SUCCESS_CONTACT)); die;
	}
}
				<form action="" method="post" class="wpcf7-form">
					<p<?php if(!empty($err["your_name"])): ?> class="err"<?php endif; ?>>
						<label><?php _e("[:nl]Uw Naam[:en]Your name") ?> (*):</label>
						<span class="wpcf7-form-control-wrap"><input type="text" name="your_name" value="<?php echo $data["your_name"] ?>" size="40" class="wpcf7-form-control wpcf7-text" /></span>
					</p>
					<p<?php if(!empty($err["your_company"])): ?> class="err"<?php endif; ?>>
						<label><?php _e("[:nl]Bedrijfsnaam[:en]Company") ?>:</label>
						<span class="wpcf7-form-control-wrap"><input type="text" name="your_company" value="<?php echo $data["your_company"] ?>" size="40" class="wpcf7-form-control wpcf7-text" /></span>
					</p>
					<p<?php if(!empty($err["your_phone"])): ?> class="err"<?php endif; ?>>
						<label><?php _e("[:nl]Telefoonnummer[:en]Phone") ?>:</label>
						<span class="wpcf7-form-control-wrap"><input type="text" name="your_phone" value="<?php echo $data["your_phone"] ?>" size="40" class="wpcf7-form-control wpcf7-text" /></span>
					</p>
					<p<?php if(!empty($err["your_email"])): ?> class="err"<?php endif; ?>>
						<label><?php _e("[:nl]E-mailadres[:en]Email") ?> (*):</label>
						<span class="wpcf7-form-control-wrap"><input type="email" name="your_email" value="<?php echo $data["your_email"] ?>" size="40" class="wpcf7-form-control wpcf7-text" /></span>
					</p>
					<p<?php if(!empty($err["your_subject"])): ?> class="err"<?php endif; ?>>
						<label><?php _e("[:nl]Onderwerp[:en]Subject") ?> (*):</label>
						<span class="wpcf7-form-control-wrap"><input type="text" name="your_subject" value="<?php echo $data["your_subject"] ?>" size="40" class="wpcf7-form-control wpcf7-text" /></span>
					</p>
					<p<?php if(!empty($err["your_message"])): ?> class="err"<?php endif; ?>>
						<label><?php _e("[:nl]Eventuele opmerkingen[:en]Message") ?> (*):</label>
						<span class="wpcf7-form-control-wrap"><textarea name="your_message" cols="40" rows="10" class="wpcf7-form-control wpcf7-textarea"><?php echo $data["your_message"] ?></textarea></span>
					</p>

					<p>
						<input type="submit" value="Verstuur &gt;" class="wpcf7-form-control wpcf7-submit" />
					</p>
				</form>

template-contact-mail.php

<br />Onderwerp: <?php echo $caption ?>
<br />
<br />NAAM:
<br /><?php echo $your_name ?>
<br />
<br />BEDRIJFSNAAM:
<br /><?php echo $your_company ?>
<br />
<br />TELEFOONNUMMER:
<br /><?php echo $your_phone ?>
<br />
<br />E-MAIL ADRES:
<br /><?php echo $your_email ?>
<br />
<br />ONDERWERP:
<br /><?php echo $your_subject ?>
<br />
<br />EVENTUELE OPMERKINGEN:
<br /><?php echo $your_message ?>
<br />
<br />--
<br />kenobisoft.com

Plugin API/Filter Reference/wp mail from
Plugin API/Filter Reference/wp mail from name
Function Reference/wp mail