This might be helpful:

<cfset mailservers=ArrayNew(1)>
<cfset mailservers[1]="mail1">
<cfset mailservers[2]="mail2">
<cfset mailservers[3]="mail3">

<cfloop from="1" to="#N#" index="i">
 <cfset servernumtouse= i MOD ArrayLen(mailservers) + 1>
 ...
 <cfmail server="#mailservers[servernumtouse]# ...

</cfloop>

> -----Original Message-----
> From: Buddy [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 16, 2002 12:33 PM
> To: CF-Talk
> Subject: rotating mail servers - cfmail...
> 
> 
> Hey everyone, I'm writing a mail app and looking for 
> suggestions for a cool
> way to handle part of the app:
> 
> I am sending a bunch of emails out with CFMAIL. I am looping 
> over a list of
> the addresses, it could be from a query or a struct or an 
> array, doesn't
> really matter to me or the app, anyway, as I loop over the 
> emails I would
> like to have the app evenly distribute the mails between any 
> number of my
> mail servers, to keep the load lighter on all of them. It could be any
> number, but right now it is 3: mail, mail2, and mail3. Anyone have any
> thoughts about a really cool or elegant way to do this? Thanks y'all.
> Buddy
> 
> 
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to