/    Sign up×
Community /Pin to ProfileBookmark

Email to multiple recipients

Hi all

Greetings from Denmark!

I need a little help with this code.

What I want is :
1. to select a member and copy the selected emailadresses to the BCC-field in the members default mailklient.
2. Pressing a submit button the mailklient opens and user are ready to post it.

I’ve found this code, but want to have it modfied.

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”
http://www.w3.org/TR/html4/loose.dtd“>
<html>
<head>
<title>Tomt dokument</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
<script language=”javascript” type=”text/javascript”>
function mailAddresses(f){
addresses = f.mails;
var txt = “”;
for(i=0;addresses.length>i;i++){
if(addresses[i].checked)txt+=addresses[i].value+”,”;
}
alert(txt);
if(txt)
document.getElementById(‘mailLink’).href += “;bcc:”+txt;
}
</script>
</head>

<body>
<br>
<form id=”minForm” name=”minForm”>
<input type=”checkbox” name=”mails” value=”[email protected]“>&nbsp;Karl Petersen<br>
<input type=”checkbox” name=”mails” value=”[email protected]“>&nbsp;Anders Petersen<br>
<input type=”checkbox” name=”mails” value=”[email protected]“>&nbsp;Søren Petersen<br>
<input type=”checkbox” name=”mails” value=”[email protected]“>&nbsp;Peter Petersen<br>
<input type=”checkbox” name=”mails” value=”[email protected]“>&nbsp;Rune Petersen<br>
<input type=”checkbox” name=”mails” value=”[email protected]“>&nbsp;Carina Petersen<br>
<input type=”checkbox” name=”mails” value=”[email protected]“>&nbsp;Uffe Petersen<br>

<br><a id=”mailLink” href=”mailto:[email protected]” onclick=”mailAddresses(document.getElementById(‘minForm’));alert(this.href);return false;” style=”text-decoration:none;color:red”>Send Mail</a>
</form>
</body>
</html>

Any ideas ?

Thanks!
NILLER

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @NILLER spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...