Reputation: 17956
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?
Upvotes: 7
Views: 11958
Reputation: 21720
You can use either of them, and it should be fine. Although for consistency with existing email clients, I'd use a 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.
Upvotes: 5
Reputation: 6430
Per https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-tags/tags-m-o/cfmail.html
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.
Upvotes: 5
Reputation: 19804
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.
Upvotes: -1
Reputation: 6258
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
Upvotes: 0