2010-06-05 36 views

回答

1
<?php mail($email, 'thanks for your comment', 'many thanks, we will get back to you'); ?> 
0

要發送的郵件,使用此代碼,

<?php 
    //define the receiver of the email 
    $to = '[email protected]'; 
    //define the subject of the email 
    $subject = 'Test email'; 
    //define the message to be sent. Each line should be separated with \n 
    $message = "Hello World!\n\nThis is my first mail."; 
    //define the headers we want passed. Note that they are separated with \r\n 
    $headers = "From: [email protected]\r\nReply-To: [email protected]"; 
    //send the email 
$mail_sent = @mail($to, $subject, $message, $headers); 
//if the message is sent successfully print "Mail sent". Otherwise print "Mail failed" 
echo $mail_sent ? "Mail sent" : "Mail failed"; 

?>

和激活碼,使用您的數據庫,創建電子郵件和電話號碼AUTO_INCREMENT表,當他登記在數據庫中,數據庫中將創建自動代碼並將該代碼發送至電子郵件,

相關問題