Solved

Send email to only checked members.

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

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…
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…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

785 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