php - How to replace multiple strings in $mail ->msgHTML -


how replace name=[name_here] in addition [email_here] in following code?

php

$mail ->msghtml(str_replace('[email_here]', $email2, file_get_contents('email-content.php')), dirname(__file__)); 

html

<p>   click on following link reset password.   <a href="https://www.sample-site.com/reset_password.php?email=[email_here]&&name=[name_here]">     reset password   </a>. </p> 

i tried following doesn't send out email , shows unable send body error.

$email2 = "email.com"; $name = "myname";  $mail->msghtml(   str_replace(array('[email_here]', $email2,'[name_here],$name'),      file_get_contents('email-content.php')), dirname(__file__) ); 


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -