Solved

Send email to only checked members.

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

895 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

13 Experts available now in Live!

Get 1:1 Help Now