Solved

Send email to only checked members.

Posted on 2004-08-09
3
185 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Restrict IIS Website without Windows login 7 52
Two nodes for updates and forwarding 8 46
wordpress limitations 4 91
CFFILE upload help 98 111
A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

708 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now