Sending only one E-mail through CFMAIL when multiple records have same e-mail address

I would like to remind each person that has posted data to a table through my ColdFusion server to an Access Database each morning to update or remove their posts.  To do this I am using CFSCHEDULE and CFMAIL.  The only problem is I am using CFOUTPUT to run through the lines sending out an e-mail message to each person, but if one person has multiple records then they get multiple e-mails.  How can I send out just one e-mail to each person?  This is what I have so far:

<head>
      <title>Untitled</title>
<CFQUERY NAME="query_name" DATASOURCE="data_source">
    SELECT *
    FROM table
</CFQUERY>
</head>

<body>
<CFOUTPUT query="query_name">
    <CFMAIL TO="#email#"
            FROM="email@email.com"
            CC="anotheremail@email.com"
            SUBJECT="subject"
            SERVER="mail_server"
            PORT="25">

#name#,
This is a reminder that you have posted something somewhere
    </CFMAIL>  

Any ideas would be great.  I don't know why this is kicking my butt, but it is.  Thanks
austintreAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

suramsureshbabuCommented:
just try to change the query

use SELECT DISTINCT email FROM table

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kkhippleCommented:
like suram points out .. chg your query


<CFQUERY NAME="query_name" DATASOURCE="data_source">
    SELECT DISTINCT email, name
    FROM table
</CFQUERY>


this will only retrun one email per multiple email addressses
0
austintreAuthor Commented:
That was probably the easiest 500 points you ever received!!!  I guess i need to learn more about SQL statements.  Thanks for your help.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.