Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Send email to only checked members.

Posted on 2004-08-09
3
213 Views
Last Modified: 2013-12-24
I have a section that allows to post comments and choose the members that you would to send the comments to.  What is the best method for sending an email to only those names that are checked?  Currently I have the value of each checkbox as the email address, is that the best way, or should the value be their ID in the database and then loop through the database to grab the email address.  I am just looking for the easiest and most efficient method.

Thank you,
Jeff
0
Comment
Question by:jeffmace
3 Comments
 
LVL 5

Assisted Solution

by:Seth_Bienek
Seth_Bienek earned 100 total points
ID: 11757433

Hey Jeff,

Sounds like you're using the most efficient method.  The only concerns you should address are:

Are the email addresses being exposed to web spiders that collect email addresses for spam?  If the site is publicly accessible, or if you are concerned about someone signing up for membership and then using it to collect email addresses, then you should go the database route.

Are you able to display the real names next to the checkboxes, or just the email addresses?  Alot of times it is hard to deduce who someone is by just their email address.  If it's not possible to show the real name, but pass the email address in the form, then maybe you should go the database route.

Take Care,

Seth
0
 
LVL 2

Accepted Solution

by:
russmichaels earned 400 total points
ID: 11757541
If you have the email addresses as the value of the checklist, you can then loop over the results and email each person. Altho if you wanted to flag each person so you know you have emaile dthem, you would be better having the USERID or whatever youa re using as the primary key as the value of the checkbox and then perform an update on those records and then select them to email them.

to use the checkbox as email method you would do as follows on the submission page.

<cfloop list="#form.checkboxname#" index="x">
<cfmail to="#x#" from="youraddress" subject="whatever">
your email text here
</cfmail>
</cfloop>

0
 

Author Comment

by:jeffmace
ID: 11758110
That's exactly what I was looking for.  I knew there was a simple way of doing it without having to pull from the database.

I split the points because I found Seth_Bienek's points to be of good value to me and other programmers out there.  Thank you to both of you for your knowledge.

Jeff
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question