Sending Html page as body of Mail in php with variable values -


i have html page uploaded on server payment_receipt.html;

i using phpmailer send emai. receipt have send body of email.

simply

$content = file_get_contents("somefile.html")) 

can trick. need set values amount, client name etc. placed inside html

<div class="customername">dear{customer name}</div>             <div class="confirmation">this email confirms purchase of following services:</div> 

etc.

how can set these values in html before sending body of mail.?

if know strings need replace be, run str_replace or similar on $content

$content = str_replace('{customer name}', $replacement_variable, $content); 

Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -