email form html code example

Example 1: email link html

<a href = "mailto: [email protected]">Send Email</a>

Example 2: html email input

<form>
  
  <div>
    <label for="email-input">Label text</label><br>
    <input 
      id="email-input" 
      type="email" 
      name="email-inputted" 
      placeholder="placeholder-text">
  </div>
  
  <button type="submit">Submit</button>
</form>

Example 3: html send email

<!-- Code by Scratchy -->
<!-- Twitter: @S_cratchy-->

<a href="mailto:[email protected]"<button>E-Mail me</a>

Example 4: how to add an email box in html

Email : <input type="email">

Example 5: html send email

<a href="mailto:[email protected]"<button>E-Mail me</a>

Example 6: html email

$mailtext = '<html>
<head>
    <title>HTML-E-Mail mit PHP erstellen</title>
</head>

<body>
...
</body>
</html>
';

$empfaenger = "[email protected]";  // Mailadresse
$absender   = "[email protected]";
$betreff    = "Mail-Test - HTML-E-Mail mit PHP erstellen";
$antwortan  = "[email protected]";

$header  = "MIME-Version: 1.0\r\n";
$header .= "Content-type: text/html; charset=utf-8\r\n";

$header .= "From: $absender\r\n";
$header .= "Reply-To: $antwortan\r\n";
// $header .= "Cc: $cc\r\n";  // falls an CC gesendet werden soll
$header .= "X-Mailer: PHP ". phpversion();

mail( $empfaenger,
      $betreff,
      $mailtext,
      $header);

echo "Mail wurde gesendet!";

Tags:

Html Example