2011-03-03 635 views
0
<?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("[email protected]","Vista"); 

$mail->SetFrom('[email protected]', 'Vista'); 

$mail->AddReplyTo("[email protected]","Vista"); 

$address = "[email protected]"; 
$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> 
+1

你到底在問什麼? – 2011-03-03 06:45:33

+4

在這裏傾銷你的代碼,沒有一個你不明白的問題和你的問題是什麼,不會鼓勵人們來幫助你... – 2011-03-03 06:46:11

回答

3

如果你的意思是,你如何發送電子郵件到([email protected])和你指定的其他一些電子郵件 - 基本上,不止一個人。再次調用addAddress()方法。

$mail->AddAddress('[email protected]', "The Name"); 
相關問題