-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlink.html
More file actions
31 lines (29 loc) · 1011 Bytes
/
link.html
File metadata and controls
31 lines (29 loc) · 1011 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Botão de Enviar E-mail</title>
</head>
<body>
<h1>Redirecionar para um E-mail</h1>
<button id="emailButton">Enviar e-mail para todos</button>
<script>
// Lista de e-mails em formato JSON
const emailList = [
"email1@example.com",
"email2@example.com",
"email3@example.com"
];
// Função para gerar o link "mailto:" com todos os e-mails
document.getElementById("emailButton").onclick = function() {
// Concatena todos os e-mails com vírgula
const emails = emailList.join(',');
// Cria o link mailto com os e-mails preenchidos
const mailtoLink = `mailto:${emails}`;
// Redireciona o usuário para o cliente de e-mail
window.location.href = mailtoLink;
};
</script>
</body>
</html>