피카부 RSS 태그 관리 글쓰기 방명록 다시 시작하는 개발 블로그
2014-03-13 15:54:39

php에서 간단히 mail 함수로 이메일 송신

$to = 'nobody@example.com'; //상대 메일주소
$subject = 'the subject'; //제목
$message = 'hello'; //본문
$headers = 'From: webmaster@example.com' . "\r\n" .
  'Reply-To: webmaster@example.com' . "\r\n" .
  'X-Mailer: PHP/' . phpversion(); //헤더설정
mail($to, $subject, $message, $headers); //메일송신