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

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -