Why doesn't Coldfusion send an email if only one of them is invalid?

I have cfmail sending up to about 8 people (dynamically). One of these addresses is incorrect, so all email is not sent. Are there any settings in the coldfusion admin or in the cfmail tag where you can change this so that it sends 7 right people and only crashes for one person. I am using CF8.

+3
source share
2 answers

Old school:

<cfloop query="mails">
  <cftry>
    <cfmail from="#from#" to="#to#">
      <!--- ... --->
    </cfmail>
    <cfcatch>
      <div>
        Mail not sent. #cfcatch.detail#
      </div>
    </cfcatch>
  </cftry>
</cfloop>
+6
source

You can pre-process the list of letters with IsValid () and remove all items from the list that does not work.

+1
source

Source: https://habr.com/ru/post/1716525/


All Articles