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>
<--- Code begins here ---><br>
<br>
<head><br>
<title>Mass Emailer</title><br>
</head><br>
<div align="center"><b><h1>Rob Rowald's Mass Emailer</h1></b></div><br>
<body bgcolor="#000000" text="#00ff00" link="#00ff00" vlink="#00ff00" alink="#00ff00"><br>
<CFIF IsDefined("form.mailto")><br>
<!--- <CFIF form.mailto is not "" AND form.mailfrom is not "" AND form.Subject is not ""> ---><br>
<cfmail to="#form.mailto#" from="#form.mailFrom#" subject="#form.subject#" server="209.185.126.54" port=25>#form.body#</cfmail> <br>
</CFIF> <br>
<!--- </CFIF> ---><br>
<P><br>
<form action="#form.mailto#" method="post" enctype="multipart/form-data"><br>
<PRE><tr><br>
<td align="right"><font face="arial,helvetica" size=2>Subject</font></td><br>
<br><br>
<td colspan="3" align="left"><input name="Subject" size="105" ></td><br>
</tr><br>
<br><br>
<td align="right"><font face="arial,helvetica,serif" size="2">Message</font></td><br><br>
<INPUT name="Text Box" <br>
style="HEIGHT: 412px; WIDTH: 857px"> </P><br>
<P><br>
<tr><br>
<td align="right"><font face="arial,helvetica" size=2>Attach File</font></td> <br>
<td colspan="3" align="left"> <input type="file" name="File"></td><br>
</tr><br>
<br><br></P><br>
<table width="600" border="0" cellspacing="0" cellpadding="5" align="left"><br>
<TR><br>
<TD VALIGN=top BGCOLOR="#000000" ><br>
<B>Mail To: </B><BR><br>
<cfquery name="GetNames" datasource="test1" dbtype="ODBC">SELECT * FROM Maillist ORDER BY Name</cfquery><br>
<SELECT NAME="Names" SIZE=4 MULTIPLE><br>
<cfoutput query="GetNames"><br>
<OPTION VALUE="Everyone" SELECTED>Everyone<br>
<option value="#email#">#name#</cfoutput></option><br>
</SELECT><br>
<br><br><center><br>
<INPUT TYPE="Submit" NAME="Send"></pre><br>
<!--- establish required fields ---><br>
</body><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>
<--- Code begins here ---><br>
<br>
<head><br>
<title>Mass Emailer</title><br>
</head><br>
<div align="center"><b><h1>Rob Rowald's Mass Emailer</h1></b></div><br>
<body bgcolor="#000000" text="#00ff00" link="#00ff00" vlink="#00ff00" alink="#00ff00"><br>
<CFIF IsDefined("form.mailto")><br>
<!--- <CFIF form.mailto is not "" AND form.mailfrom is not "" AND form.Subject is not ""> ---><br>
<cfmail to="#form.mailto#" from="#form.mailFrom#" subject="#form.subject#" server="209.185.126.54" port=25>#form.body#</cfmail> <br>
</CFIF> <br>
<!--- </CFIF> ---><br>
<P><br>
<form action="#form.mailto#" method="post" enctype="multipart/form-data"><br>
<PRE><tr><br>
<td align="right"><font face="arial,helvetica" size=2>Subject</font></td><br>
<br><br>
<td colspan="3" align="left"><input name="Subject" size="105" ></td><br>
</tr><br>
<br><br>
<td align="right"><font face="arial,helvetica,serif" size="2">Message</font></td><br><br>
<INPUT name="Text Box" <br>
style="HEIGHT: 412px; WIDTH: 857px"> </P><br>
<P><br>
<tr><br>
<td align="right"><font face="arial,helvetica" size=2>Attach File</font></td> <br>
<td colspan="3" align="left"> <input type="file" name="File"></td><br>
</tr><br>
<br><br></P><br>
<table width="600" border="0" cellspacing="0" cellpadding="5" align="left"><br>
<TR><br>
<TD VALIGN=top BGCOLOR="#000000" ><br>
<B>Mail To: </B><BR><br>
<cfquery name="GetNames" datasource="test1" dbtype="ODBC">SELECT * FROM Maillist ORDER BY Name</cfquery><br>
<SELECT NAME="Names" SIZE=4 MULTIPLE><br>
<cfoutput query="GetNames"><br>
<OPTION VALUE="Everyone" SELECTED>Everyone<br>
<option value="#email#">#name#</cfoutput></option><br>
</SELECT><br>
<br><br><center><br>
<INPUT TYPE="Submit" NAME="Send"></pre><br>
<!--- establish required fields ---><br>
</body><br>