EasyCFM.COM ColdFusion Forums / Dreamweaver / Emailing members of a forum after a post

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: Emailing members of a forum after a post

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

06-11-2009 @ 3:30 AM
Send P.M.
My Gravatar!
Powered by Gravatar
Junior Member
Posts: 74
Joined: Aug 2005


I have a CF written forum in a website member's area.  I have a database called Members and a field EmailPermission.

The idea is, if EmailPermission in the Member's table is set to 1, then, everytime there is a post to one of the forum topics, all the members with this setting will get an email.

While the code below works in other 'bulk' emailing applications I have, I am not getting it to work in this application.

I have indicated the start and end of the emailing code.  This is positioned above the <html> tag.

Is this code in the right position on the page?

Many thanks in anticipation.


--------------------start of emailing code

<!-- If the user is submitting the form -->
<cfif IsDefined("FORM.Topic")>
  <!-- Retrieve "mailing list" records from database  -->

<cfquery name="rsMember" datasource="mungrisdalewriters">
FROM Members
WHERE EmailPermission = 1

     A post has been made by #FORM.PostedBy# to #FORM.Topic#

-------------end of emailing code----------------------

<html><!-- InstanceBegin template="/Templates/header_2.dwt.cfm" codeOutsideHTMLIsLocked="false" -->
<!-- InstanceBeginEditable name="doctitle" -->
<title>Mungrisdale Writers Forum Topic Thankyou</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- InstanceBeginEditable name="head" --> <!-- InstanceEndEditable -->

<table width="650" align="center">
    <td height="174">
<p><img src="/Images/high_pike_650x229j.jpg" width="650" height="229" border="0" usemap="#Map3"></p></td>
    <td><!-- InstanceBeginEditable name="EditRegion3" -->
      <table width="100%" cellspacing="2" cellpadding="1">
          <td bordercolor="#99CCCC" bgcolor="#FFFFFF"><div align="left"><font color="#000000" size="1" face="Verdana">Thank
              you for visiting Mungrisdale Writers</font></div></td>
          <td bordercolor="#99CCCC" bgcolor="#FFFFFF"><div align="right"><font color="#000000" size="1" face="Verdana">You
              are logged in as: <cfoutput>#COOKIE.mungrisdalewriters#</cfoutput></font></div></td>
          <td colspan="2"> </td>
          <td colspan="2"><font size="4" face="Verdana"><strong>Mungrisdale Writers Member's Forum - Add Topic Post</strong></font></td>
          <td colspan="2">
<div align="justify"></div></td>
          <td colspan="2">
<div align="center">
              <p><font size="2" face="Arial, Helvetica, sans-serif">If you would like to add another post to this topic, then please do so below. If you would like to return to the Topic list without making an initial post, then <a href="/Forum/forum_topics.cfm">click here</a></font></p>
          <td colspan="2"><div align="center"><font size="4" face="Verdana"><strong><cfoutput>#rsTopic.Topic#</cfoutput></strong></font></div></td>
          <td colspan="2">
          <td colspan="2">
<form name="form1" method="POST" action="<cfoutput>#CurrentPage#</cfoutput>">
              <table width="100%" cellspacing="2" cellpadding="1">
                  <td width="28%" valign="top">
<div align="right"><font size="2" face="Verdana">Your Post for this Topic:</font></div></td>
                  <td width="72%">
<textarea name="Post" cols="65" rows="8" id="Post"></textarea></td>
                  <td valign="top">
<input name="Topic" type="hidden" id="Topic" value="<cfoutput>#URL.Topic#</cfoutput>">
                    <input name="PostedBy" type="hidden" id="PostedBy" value=<cfoutput>#Cookie.mungrisdalewriters#</cfoutput>></td>
<input type="submit" name="Submit" value="Add Post"></td>
              <input type="hidden" name="MM_InsertRecord" value="form1">

Website Designed and Developed by Pablo Varando.