how to send email to (-pauline@vista.com.my-) and (-$email-)?
<?php
$full_name= $_GET["full_name"];
$email= $_GET["email"];
$telephone= $_GET["telephone"];
$option1= $_GET["option1"];
$option2= $_GET["option2"];
$message= $开发者_运维问答_GET["message"];
require_once('class.phpmailer.php');
$mail = new PHPMailer(); // defaults to using php "mail()"
$mail->AddReplyTo("pauline@vista.com.my","Vista");
$mail->SetFrom('pauline@vista.com.my', 'Vista');
$mail->AddReplyTo("pauline@vista.com.my","Vista");
$address = "pauline@vista.com.my";
$mail->AddAddress($address, "Vista");
$mail->Subject = "Vista";
$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
$mail->Body = "VISTA Eye Specialist Form <br><br>
Name : $full_name<br>
Email : $email<br>
Contact : $telephone<br>
Branches : $option1<br>
Services : $option2<br>
Comments : $message<br>
Thank You!<br>
";
if(!$mail->Send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
} else {
echo "Please Wait...!<br>
Name : $full_name<br>
Email : $email<br>
Contact : $telephone<br>
Branches : $option1<br>
Services : $option2<br>
Comments : $message<br>
Thank You!<br>
";
}
?>
<html>
<head>
<script>
<!--
timeout = '4000'; // milliseconds/1000th of a sec
window.onload = setTimeout(myRedirect, timeout); // ensure we load the whole page
function myRedirect() {
window.location = "index.php";
}
//-->
</script>
</head>
<body>
</body>
</html>
If you mean, how can you send an email to (-pauline@vista.com.my-) and some other email you specify - basically, more than one person. Just call the addAddress()
method again.
$mail->AddAddress('myotheraddress@address.com', "The Name");
精彩评论