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@email.comr" /> email1 (email@email.com)<br/>
<input type="checkbox" class="marcar" name="email2" value="email@email.com" /> email2 (email@email.com)<br/>
<input type="checkbox" class="marcar" name="email3" value="email@email.com" /> email3 (email@email.com)<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