0
**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();
IM。PHP的file_get_contents然後使用PHPMailer的作爲郵件程序庫以及如何更換那些{字符串}的mailFooter()函數中的函數替換字符串
不使感;檢查[這個鍵盤](http://codepad.viper-7.com/qmICKH) –
'mailerFooter($ content);'函數被稱爲'mailFooter()' –
@Bondye我希望這只是一個錯字。 –