Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Help with a Mass emailer

Status
Not open for further replies.

robrowald

MIS
Jul 16, 1999
2
US
I'm trying to set up a mass emailer using CF.<br>
Here is what I want to do.<br>
I have an access DB with all my freinds and relatives email addresses. 1 table called Maillist, 2 fields called Name and Email. I want to have a form that I type in the Subject, the body of the message, and have the ability to attach a file. I want a choice box that i can select everyone or just certian people from my database. So far i have been unsuccessful. I would appreciate any help i can get as I am a beginner at this. Below is my code so far.<br>
Please feel free to email me at robrowald@netzero.net with ideas or suggestions. Thanks.<br>
<br>
<br>
&lt;--- Code begins here ---&gt;<br>
<br>
&lt;head&gt;<br>
&lt;title&gt;Mass Emailer&lt;/title&gt;<br>
&lt;/head&gt;<br>
&lt;div align="center"&gt;&lt;b&gt;&lt;h1&gt;Rob Rowald's Mass Emailer&lt;/h1&gt;&lt;/b&gt;&lt;/div&gt;<br>
&lt;body bgcolor="#000000" text="#00ff00" link="#00ff00" vlink="#00ff00" alink="#00ff00"&gt;<br>
&lt;CFIF IsDefined("form.mailto")&gt;<br>
&lt;!--- &lt;CFIF form.mailto is not "" AND form.mailfrom is not "" AND form.Subject is not ""&gt; ---&gt;<br>
&lt;cfmail to="#form.mailto#" from="#form.mailFrom#" subject="#form.subject#" server="209.185.126.54" port=25&gt;#form.body#&lt;/cfmail&gt; <br>
&lt;/CFIF&gt; <br>
&lt;!--- &lt;/CFIF&gt; ---&gt;<br>
&lt;P&gt;<br>
&lt;form action="#form.mailto#" method="post" enctype="multipart/form-data"&gt;<br>
&lt;PRE&gt;&lt;tr&gt;<br>
&lt;td align="right"&gt;&lt;font face="arial,helvetica" size=2&gt;Subject&lt;/font&gt;&lt;/td&gt;<br>
&lt;br&gt;<br>
&lt;td colspan="3" align="left"&gt;&lt;input name="Subject" size="105" &gt;&lt;/td&gt;<br>
&lt;/tr&gt;<br>
&lt;br&gt;<br>
&lt;td align="right"&gt;&lt;font face="arial,helvetica,serif" size="2"&gt;Message&lt;/font&gt;&lt;/td&gt;&lt;br&gt;<br>
&lt;INPUT name="Text Box" <br>
style="HEIGHT: 412px; WIDTH: 857px"&gt; &lt;/P&gt;<br>
&lt;P&gt;<br>
&lt;tr&gt;<br>
&lt;td align="right"&gt;&lt;font face="arial,helvetica" size=2&gt;Attach File&lt;/font&gt;&lt;/td&gt;&nbsp;<br>
&lt;td colspan="3" align="left"&gt;&nbsp;&lt;input type="file" name="File"&gt;&lt;/td&gt;<br>
&lt;/tr&gt;<br>
&lt;br&gt;&lt;br&gt;&lt;/P&gt;<br>
&lt;table width="600" border="0" cellspacing="0" cellpadding="5" align="left"&gt;<br>
&lt;TR&gt;<br>
&lt;TD VALIGN=top BGCOLOR="#000000" &gt;<br>
&lt;B&gt;Mail To: &lt;/B&gt;&lt;BR&gt;<br>
&lt;cfquery name="GetNames" datasource="test1" dbtype="ODBC"&gt;SELECT * FROM Maillist ORDER BY Name&lt;/cfquery&gt;<br>
&lt;SELECT NAME="Names" SIZE=4 MULTIPLE&gt;<br>
&lt;cfoutput query="GetNames"&gt;<br>
&lt;OPTION VALUE="Everyone" SELECTED&gt;Everyone<br>
&lt;option value="#email#"&gt;#name#&lt;/cfoutput&gt;&lt;/option&gt;<br>
&lt;/SELECT&gt;<br>
&lt;br&gt;&lt;br&gt;&lt;center&gt;<br>
&lt;INPUT TYPE="Submit" NAME="Send"&gt;&lt;/pre&gt;<br>
&lt;!--- establish required fields ---&gt;<br>
&lt;/body&gt;<br>

 
let's not look into codes here first.<br>
start with some planning and case study.<br>
<br>
ever use Yahoo! mail.<br>
<br>
their web base email have what u want.<br>
in fact, I find it easy to use.<br>
<br>
now u have a form that allows u to choose<br>
who to email to.<br>
<br>
question <br>
1. what if u have 1000 names, are u going to list all<br>
of them.<br>
<br>
suggestion :<br>
have a seperate window that allows u to choose names<br>
u want, there should be an option that lets u email<br>
everyone with a single click.<br>
using a seperate window will mean that your user <br>
interface is less cluttered.<br>
<br>
your form will submit to another CF file.<br>
This CF file will processed all the names and sent<br>
them out as email.<br>
<br>
think thru' what u need and what to add before <br>
u jump into the codes.<br>
Planning is very important even though u doesn't<br>
seems to be producing any thing at all.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top