0
我目前正在嘗試使用php mail()函數發送HTML聯繫表單或其內容。只要掛斷並尋求幫助。我該如何發送帶有html聯繫表格的PHP郵件
我該如何您通過PHP在聯繫表單中指定的輸入文本和電子郵件地址?
所以我的代碼看起來目前,它的作品。只有我不知道我是怎麼輸入的數據,並把它..
HTML代碼:
<form class="" action="senden.php" method="post">
<div class="">
<label>Name</label>
<input type="text" name="von" placeholder="Bitte geben Sie Ihren Namen ein" value="">
<label>E-Mail Adresse</label>
<input type="text" name="email" placeholder="Bitte geben Sie Ihre Email-Adresse ein" value="">
<label>Telefonnummer</label>
<input type="tel" name="tel" placeholder="Bitte geben Sie Ihre Telefonnummer ein" value="">
</div>
<div class="">
<label>Nachricht</label>
<textarea placeholder="Bitte geben Sie Ihre Nachricht ein" name="nachricht" rows="8" cols="40"></textarea>
<button type="submit" name="submit" value="">Nachricht Abschicken</button>
</div>
</form>
`
PHP代碼:
<?php
$empfaenger = "[email protected]";
$betreff = "Mail Function";
$from = "From: Max Reimers <[email protected]>";
$text = "Email Email Email Email Text Text Text";
mail($empfaenger, $betreff, $text, $from);
?>
的可能的複製[如何使用PHP來發送電子郵件?(https://stackoverflow.com/questions/5335273/how -to-email-an-email-using-php) – Qirel
重複的https://stackoverflow.com/questions/13232631/get-all-post-data-and-send-in-email –
可能重複的[Unable to通過PHP郵件發送郵件()](https://stackoverflow.com/questions/4733154/unable-to-send-mail-via -php信箱) –