예제 #1
0
/* Set the actual message, both HTML and TXT
-------------------------------------------------------------------*/
// Load the HTML template
//$template_file = fopen ( 'mail_template.html' , 'r' );
/*$template = '';
	while (!feof ($template_file)) {
		$template .= fgets ($template_file);
	}
	fclose ($template_file); */
$msg = <<<MSG
this is text test mail in php
MSG;
/*$mailer->reparseMail ( $template , array (
		'name'=>'Jason Vertucio',
		'email'=>'*****@*****.**',
		'phone'=>'(212) 555-1212',
		'message'=>$msg
	));*/
//$mailer->setHtmlMessage($template);
$mailer->setTextMessage(nl2br($msg));
// Note that this will actually show you all the HTML
// tags and is NOT a good way of performing the task
echo "msg:::" . var_dump($msg);
/* Actually send the message!
-------------------------------------------------------------------*/
// Uncomment the following line and enter your information to send an email using SMTP.
// $mailer->setSMTP( server , port (25 or 26) , username , password );
$result = $mailer->send();
?>