0
이메일 ID 필드가있는 양식이 있습니다. 양식이 제출되면 확인 메시지가 주어진 이메일 ID로 자동 전송됩니다.주어진 이메일 아이디에 자동으로 확인 메시지 보내기
나는 PHP에서 이것을하고 싶다. 메시지가이 코드를 사용 보내려면
이메일 ID 필드가있는 양식이 있습니다. 양식이 제출되면 확인 메시지가 주어진 이메일 ID로 자동 전송됩니다.주어진 이메일 아이디에 자동으로 확인 메시지 보내기
나는 PHP에서 이것을하고 싶다. 메시지가이 코드를 사용 보내려면
<?php mail($email, 'thanks for your comment', 'many thanks, we will get back to you'); ?>
,
<?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있는 테이블을 만들고, 데이터베이스를 사용하고 데이터베이스에서 데이터베이스는 자동 코드를 생성하고 해당 코드는 전자 메일로 전송됩니다.