[PHP]Sendemail

개발관련/PHP 2012. 4. 20. 15:34 |
";

	// multiple recipients
	// $to = "junkmail@novafabrica.com, nobody@novafabrica.com";
	// $to = "Kevin Skoglund , nobody@novafabrica.com";

	$subject = "Mail Test at ".strftime("%T", time());

	$message = "This is a test.";
	// Optional: Wrap lines for old email programs
	// wrap at 70/72/75/78
	$message = wordwrap($message,70);
	
	$from = "Kevin Skoglund ";
	$headers = "From: {$from}\n";
	$headers .= "Reply-To: {$from}\n";
	// $headers .= "Cc: {$to}\n";
	// $headers .= "Bcc: {$to}\n";
	$headers .= "X-Mailer: PHP/".phpversion()."\n";
	$headers .= "MIME-Version: 1.0\n";
	$headers .= "Content-Type: text/plain; charset=iso-8859-1";
	
	$result = mail($to, $subject, $message, $headers);
	echo $result ? 'Sent' : 'Error';
  
?>

'개발관련 > PHP' 카테고리의 다른 글

[PHP]Server Variables  (0) 2012.04.20
[PHP]Sendemail 2 (phpmailer 사용)  (0) 2012.04.20
[PHP]Dynamic Variable  (0) 2012.04.20
[PHP]References Returns  (0) 2012.04.20
[PHP]Reference Arguments  (0) 2012.04.20
Posted by 파노카페
: