views:

284

answers:

4

Do I use a comma or semicolon? I can't seem to find it in the live docs. I also can't seem to find any consistency looking online as some examples use a comma while others use a semicolon. Are both acceptable?

A: 

Comma separate the email addresses is the answer i found in o'reilly's coldfusion book. its possible semi-colons will work, but commas for sure.

-Don

Don Dickinson
+3  A: 

You can use either of them, and it should be fine, although for consistence with existing email clients, I'd use semicolon.

I'm not sure how commas would behave in other CF engines such as Railo or openBD, whereas ";" would work on all of them.

Cheers

Marcos Placona
A: 

I think it depends on your mail server. If you're using Exchange, it expects semicolons. Most smtp servers prefer commas. Experiment and see what works for you.

Adam Tuttle
CFMAIL uses SMTP, which uses commas.
Al Everett
+2  A: 

Per http://livedocs.adobe.com/coldfusion/8/htmldocs/Tags_m-o_01.html#2355015

Message recipient e-mail addresses:

* Static address, for example, "[email protected]".
* Variable that contains an address, for example, "#Form.Email#".
* Name of a query column that contains an address, for example,

"#EMail#". An e-mail message is sent for each returned row.

To specify multiple addresses, separate the addresses with commas.

(emphasis mine)

I do believe semicolons will work as well.

Al Everett