**User_Tpl.html** <html><head></head> <body> Hello {NAME}, Business name : {BUSINESS_NAME}. Tel : {TELEPHONE}. Mob : {MOBILE}. </body> </html>
function mailFooter($content) {
$sBusiness = 'Business name';
$sTelp = '0';
$sMobile = '0';
$content = str_replace('{BUSINESS_NAME}', $sBusiness, $content);
$content = str_replace('{TELEPHONE}', $sTelp, $content);
$content = str_replace('{MOBILE}', $sMobile, $content);
return $content;
}
$content = file_get_contents('page/email/User_Tpl.html');
$content = str_replace('{SUBJECT}', $subject, $content);
$content = str_replace('{NAME}', $ownerName, $content);
**mailerFooter($content);**
// always return {BUSINESS_NAME}, {TELEPHONE}
$mail->AddAddress( $email );
$mail->SetFrom($name );
$mail->AddReplyTo( $reply );
$mail->Subject = trim($subject);
$mail->MsgHTML( trim($content) );
$mail->IsHTML(true);
$mail->Send();
PHPMailer をメーラー ライブラリとして使用し、それらの {strings} を mailFooter() 関数内で置き換える方法。