advertisement -- please support sponsors

networking:
mass mailing

Currently, my Web allows the user to enter criteria for a database search. It pulls up a list of e-mail addresses matching the criteria. At this point, to send a message to each person the user has to click on each link individually. I would like to allow the user to enter text, and have that text forwarded to all the e-mail addresses in the search results. (I can set a maximum of 200 if I have to.)

My question is whether JavaScript can do this, or whether I will have to learn Java. Has it been done already?

A detailed tutorial on how to submit forms via email, without using CGI, is available on this web site under the heading,

Submitting Forms Via Email

The information given in that tutorial is perfectly applicable to the mass-mailing problem posed by our reader. All you have to do is insert your comma-seperated list of email addresses into the form's action property. This is demonstrated in the following sample <form> tag:

<form
 name    ="mail_form"
 method  ="post"
 enctype ="multipart/form-data"
 action  ="mailto:javascript@Xsharkysoft.com,frames@Xsharkysoft.com,java@Xsharkysoft.com?subject=I love your stuff!"
 onSubmit="return validate_message_body ();"
>

As demonstrated in this example, you can specify a message subject for the mass mail by appending

?subject=subject text
to the end of the list. An explanation of the rest of the form's tag can be found in the tutorial mentioned above.

P.S. If you use this trick to spam a lot of people, please don't tell them you learned it from me!

Charlton Rose
28 August 1997