I have a small problem here that I'm tried to fix for some couple of hours already. I have a PHP $mail
function that send emails to multiple addresses using PHP for loop, like:
foreach($recipients as $name => $email){
$mail->AddAddress($email, $name);
};
Problem is:
I need to get inside the Body message, each email from each user at the time of sending the message, so I can use it as variable inside the body message, I've already tried to use another foreach
inside, but no luck.
So the PHP will be something like this:
$mail->Body .='Start of the message';
$mail->Body .='path_url?user_email='.$recipient.'';
$mail->Body .='Endof the message';
Is this possible using $mail
?
Thanks!