?
Solved

Send email to only checked members.

Posted on 2004-08-09
3
Medium Priority
?
231 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
[X]
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
3 Comments
 
LVL 5

Assisted Solution

by:Seth_Bienek
Seth_Bienek earned 400 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 1600 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

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…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

752 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