...

View Full Version : Email forms to multiple people



ggkempertrubo
04-28-2004, 12:32 AM
I have a question that seems extremely easy, but, I canít find the answer.

I am looking for someone who knows how to program an email form that will automatically send emails to a list of people. By this I mean you donít have to click on boxes. Its just an average email form that sends copies to multiple people.

How do I program the code for that?

rajeshnaidu
04-28-2004, 07:50 AM
You can find the solution through this url

http://www.webreference.com/js/column70/3.html

All the best.

ggkempertrubo
04-28-2004, 09:00 AM
You can find the solution through this url

http://www.webreference.com/js/column70/3.html

All the best.

I am looking at it now, and its not really what I need. I was looking for a form where the user would not have to enter multiple email addresses. Iíll try an example.

Here is what it should look like. The lines signify the boxes you enter information.

Example of form
_____________________________________________________

Name_____________________

Address___________________

Phone_______________________

Comment_______________________

[submit]

____________________________________________________

end of example

After the user clicks the submit box the message is sent to several other emails addresses. I am thinking the concept is so basic there must be the code for it some where.

You in fact might be showing me the answer and my head is just too mixed up with differing codes for me to see it. I could also not be explaining my self too well.

Its really maddening

glenngv
04-28-2004, 09:46 AM
You need a server-side language (ASP, PHP, JSP, etc) and SMTP server to do that.

Willy Duitt
04-28-2004, 12:10 PM
Here's a group mailer I wrote for a soriety some time ago that seems to do what you are asking, although the script will need some modification if you are mailing to different domains.



<html>
<head>
<title>Sista Mailer</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<script type="text/javascript">
<!--//
function mail(form){

/////////////////////////////////////////////////////////////////
///////// ADD EMAIL USER NAMES INTO THE ARRAY BELOW /////////////
////// ENCLOSE EACH NAME IN QUOTES & SEPERATED BY COMMAS ////////
var who = new Array("Betty",
"Bonnie",
"Britany",
"Bernadet",
"Carol",
"Connie",
"Susie")

////// ADD THE CHAPTERS PRESIDENT ADDY BELOW ///////
var pres= "BIG_SISTER";

////// ADD YOUR DOMAIN PATH BELOW //////
var where = "@YOUR_DOMAIN.com";


//////////////////////////////////////////////////////////////////
var from = form.from.value;
if(!from){
alert('Please enter your name');
form.from.focus();
return false;
}


var sub = form.subject.value;
if(!sub){
alert('Please enter a subject');
form.subject.focus();
return false;
}


var message = form.message.value;
if(!message){
alert('Please enter a message for your Sorority sisters.');
form.message.focus();
return false;
}
else{
document.getElementById('msg').innerHTML = message;
}


var all = '';
for(var i=0; i<who.length; i++){
all += who[i]+where+',';
} var to = pres+where;
var msg = document.getElementById('msg').innerHTML;
form.action='mailto:'+to+'?bcc='+all+'&subject='+sub+'&body='+escape(msg);
form.submit();

}
// -->
</script>
</head>

<body onload="document.groupMail.from.focus()">
<form name="groupMail" method="post" enctype="text/html">
<p align="left">From: <input type="text" size="50" name="from"></p>
<p>Subject: <input type="text" size="50" name="subject"></p>
<p>Enter Your Message Below: </p>
<p align="center">
<textarea name="message" rows="15" cols="79"></textarea></p>
<p align="center">
<input type="button" value="Send Sister Mail" onclick="mail(this.form)"></p>
</form>

<span id="msg" style="display:none"></span>
</body>
</html>

.....Willy



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum