CFMailの場合-cfsettolistとcfsetbcclistを使用してTo:リストとBCC:リストを作成しています
これらの出力は問題ありません。しかし、それらをcfmailに追加すると、tolistおよびbcclistエラーが発生します。
カンマ区切りのリストであるため、理由はわかりません。
Get:現在emailthis @ gmail.com、emailthat @ gmail.com、emailagain@gmail.comであるtoの属性の値が無効です。
上記のリストにハードコーディングすると、問題なく動作します。
以下のアリストとクリストはうまく作成し、私にはうまく見えます。私は自分が間違っていることの解決策を見つけることができないようです。
<cfoutput>
<cfif isdefined("form.checkbox1")><cfset clist = "#checkbox1#"></cfif>
<br><br>Check List #clist#
</cfoutput>
To:
<cfset tolist = "#clist#,<cfif alist is not "">#alist#,</cfif><cfif len(other)>#other#</cfif>">
<cfoutput>#tolist#</cfoutput>
BCC List - basically the same
<cfoutput>
<cfmail type="html" from="bob@bob.com" to="#tolist#" bcc="#bcclist#" mimeattach="#pdfpath#file.pdf" subject="File.pdf">
Blahhh
</cfmail>
</cfoutput>