In my project I am using <cfmail> to send an order confirmation to a user after successful creation of an order. I have got one doubt. If the mail server goes down during that time is there any way to handle that situation with cftry and cfcatch, or doesn't it handle those errors?
1 Answers
Normally if spoolenable is enabled the email will go to the spool and the page processes whether the mail actually gets sent or not as long as all the required fields are entered and valid.
https://wikidocs.adobe.com/wiki/display/coldfusionen/cfmail
Spool Enable details from Wiki
spoolenable Optional
Whether to spool mail or always send it Immediately. Overrides the ColdFusion Administrator Spool mail messages to disk for delivery setting.
yes: saves a copy of the message until the sending operation is complete. Pages that use this option might run slower than the ones that use the No option.
no: queues the message for sending, without storing a copy until the operation is complete. If a delivery error occurs when this option is No, ColdFusion generates an Application exception and logs the error to the mail.log file.
spoolenable=falsefor generating exception when mail gets undelivered due to any reason? - user3427540