我在php中将电子邮件查询发送到多个电子邮件帐户时遇到问题,任何人都可以在这里帮助表单HTML版本
<form id="contact-form" action="#">
<div class="form-field-item">
<input type="text" required="required" name="fullname" id="fullname" size="25" placeholder="Name" class="form-field">
</div>
<div class="form-field-item">
<input type="tel" id="phone" name="phone" required="required" placeholder="Contact Number" class="form-field">
</div>
<div class="form-field-item">
<input type="email" required="required" name="email" id="email" placeholder="Email" class="form-field">
</div>
<div class="form-field-checkbox-item">
<div class="checkbox-item">
<input type="checkbox" id="agree-gdrp" name="agree-gdrp" required="required" value="Yes">
<label for="agree-gdrp" class="field-label">I agree that Fraser handles my personal data in accordance with GDPR</label>
</div>
</div>
<div class="form-submit-wrap">
<button>Send Enquiry</button>
</div>
</form>
...这是PHP:
<?php
$recepient = "info@mail1.com,awhite@mail1.com";
$sitename = "Fraser";
$fullname = trim($_POST["fullname"]);
$email = trim($_POST["email"]);
$phone = trim($_POST["phone"]);
$message = "Name: $fullname \nContact Number: $phone \nEmail: $email";
$pagetitle = "Fraser Contact Form";
mail($recepient, $pagetitle, $message, "Content-type: text/plain; charset=\"utf-8\"\n From: info@mail.com");
?>
慕娘9325324
杨__羊羊
阿波罗的战车