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

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

Hi

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.

Ronnie



--------------------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">
SELECT *
FROM Members
WHERE EmailPermission = 1
</cfquery>

<cfmail
     QUERY="GetList"
     SUBJECT="#Form.Topic#"
     FROM="webmaster@mungrisdalewriters.co.uk"
     TO="rauld@software-options.com"
     BCC=""
     TYPE="HTML">
     A post has been made by #FORM.PostedBy# to #FORM.Topic#
  </cfmail>
</cfif>

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

<html><!-- InstanceBegin template="/Templates/header_2.dwt.cfm" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- 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 -->
</head>

<body>
<table width="650" align="center">
  <tr>
    <td height="174">
<p><img src="/Images/high_pike_650x229j.jpg" width="650" height="229" border="0" usemap="#Map3"></p></td>
  </tr>
  <tr>
    <td><!-- InstanceBeginEditable name="EditRegion3" -->
      <table width="100%" cellspacing="2" cellpadding="1">
        <tr>
          <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>
        </tr>
        <tr>
          <td colspan="2"> </td>
        </tr>
        <tr>
          <td colspan="2"><font size="4" face="Verdana"><strong>Mungrisdale Writers Member's Forum - Add Topic Post</strong></font></td>
        </tr>
        <tr>
          <td colspan="2">
<div align="justify"></div></td>
        </tr>
        <tr>
          <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>
            </div></td>
        </tr>
        <tr>
          <td colspan="2"><div align="center"><font size="4" face="Verdana"><strong><cfoutput>#rsTopic.Topic#</cfoutput></strong></font></div></td>
        </tr>
        <tr>
          <td colspan="2">
<hr></td>
        </tr>
        <tr>
          <td colspan="2">
<form name="form1" method="POST" action="<cfoutput>#CurrentPage#</cfoutput>">
              
              <table width="100%" cellspacing="2" cellpadding="1">
                <tr>
                  <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>
                </tr>
                <tr>
                  <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>
                  <td>
<input type="submit" name="Submit" value="Add Post"></td>
                </tr>
              </table>
              <input type="hidden" name="MM_InsertRecord" value="form1">
            </form></td>TextTextText


Website Designed and Developed by Pablo Varando.