1
I’m using sendmail, the problem and the following. Use checkbox to mark recipients. How do I make it so that when I check the checkbox it fills a variable with each recipient, the comma and the next recipient?
input type="checkbox" name="todos" class="todos" onclick="marcardesmarcar()" /> Todos<br/>
<input type="checkbox" class="marcar" name="email1" value="[email protected]" /> email1 ([email protected])<br/>
<input type="checkbox" class="marcar" name="email2" value="[email protected]" /> email2 ([email protected])<br/>
<input type="checkbox" class="marcar" name="email3" value="[email protected]" /> email3 ([email protected])<br>
Variable you will receive in php:
$email = $_POST["email"];
After the validation has been done and filled in the body. Send:
mail($email,$assunto,$mensagem, $headers, "-r".$email_from);
I will use the mail function with the variable inside the string. More I need to send to multiples by filling the variable.
– Willian Coqueiro