<cfmail
to="#varables.my_Email_Address#"
query="USERS"
cc="#USERS.SB_USER_EMAIL_ADDRESS#"
from="#varables.default_email_address#"
subject="#form.Subject#">
help
Ie
<cfset emailTo = "" />
<cfloop query="users">
<cfset emailTo = listAppend(emailTo, users.email, ";") />
</cfloop>
<cfmail
to="#emailTo#"
Regards
Dale Fraser
http://dalefraser.blogspot.com
> Just build a list of email addresses first.
>
> Ie
>
> <cfset emailTo = "" />
> <cfloop query="users">
> <cfset emailTo = listAppend(emailTo, users.email, ";") />
> </cfloop>
>
> <cfmail
> to="#emailTo#"
>
or:
<cfmail to="#valueList(users.email,";")#" ... >
Of course this is exposing everyone's mail address to everyone
on the list. It'd be better to do:
<cfmail to="SomeDummyEmail@appropriate_domain.com"
bcc="#valueList(users.email,";")#" ... >
Paul Haddon
Technical Services Manager
Formstar Print Technologies
First of all you only have a certain amount that this field can cope with,
secondly it can be seen by some antispam software as being spam.
The only exception to this rule, is if you have a workflow for keeping
people in the loop in intranet applications. But for general mail outs, wrap
the cfloop query around the cfmail tag.
Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613 8676 4223
Mobile: 0404 998 273
-----Original Message-----
From: cfau...@googlegroups.com [mailto:cfau...@googlegroups.com] On Behalf
Of blueyoda
Sent: Thursday, 31 May 2007 12:46 PM
To: cfaussie
Subject: [cfaussie] CFMAIL sending to multiple addresses through the query
It should be similar.
Either way the mail server has to send 100 messages.
It will however make a difference to Coldfusion, to Coldfusion it’s one mail request or 101.
<br
Actually it can make a difference, but only to the CF server. If the mail server is not inside your network, then it will be 1 email. Once it hits the mail server it will be 101 emails. However, if you loop over with my method it will be 101 emails from the coldfusion server.
But as far as I am concerned it is BAD practice to send so emails out for a mailing list, or mail out or email campaign with emails in the CC address. Its just wrong, and can cause problems with ISP’s and mail clients as well as antispam / antivirus software. Not to mention that, this field only can hold so many email addresses to begin with.
On Thu, May 31, 2007 at 12:54:14PM +1000, Dale Fraser wrote:
> Just build a list of email addresses first.
>
> Ie
>
> <cfset emailTo = "" />
> <cfloop query="users">
> <cfset emailTo = listAppend(emailTo, users.email, ";") />
> </cfloop>
>
> <cfmail
> to="#emailTo#"
>
or:
<cfmail to="#valueList(users.email,";")#" ... >
Of course this is exposing everyone's mail address to everyone
on the list. It'd be better to do:
<cfmail to="SomeDummyEmail@appropriate_domain.com"
bcc="#valueList(users.email ,";")#" ... >
Paul Haddon
Technical Services Manager
Formstar Print Technologies