CFEmail – Alternatives for the user

For those times when CFMail Just won’t cooperate, rather than throwing only an error message, give your user a chance to send the email from their own mail client on their PC/device. If CFMail fails the user is provided a link which opens Outlook or which ever Email client has been chosen on their PC.

<cfset mailerr = "Email Sent"><!---default message --->

<!---Send to="#emaillist#"--->
<p>Dear Whoever,<br /><br />

<cfcatch type="any">
<cfset mailerr = "There was a problem sending the email.">
<a href="mailto:#emaillist#?subject=#subject#&body=#urlEncodedformat(FORM.comment)#">
Webmail System Error: Please click here to send a manual Email via your PC.</a>

Then output the mailerr

Cup size   
Select size then click on coffee cup.
This entry was posted in Code, Coldfusion, Problems & Fixes, Snippets and tagged , , , . Bookmark the permalink.