{"id":953,"date":"2013-02-19T21:38:41","date_gmt":"2013-02-19T16:38:41","guid":{"rendered":"http:\/\/www.esearing.com\/v2010\/?p=953"},"modified":"2013-02-19T21:38:41","modified_gmt":"2013-02-19T16:38:41","slug":"cfemail-alternatives-for-the-user","status":"publish","type":"post","link":"https:\/\/www.esearing.com\/v2010\/2013\/02\/cfemail-alternatives-for-the-user\/","title":{"rendered":"CFEmail  &#8211; Alternatives for the user"},"content":{"rendered":"<p>For those times when CFMail Just won&#8217;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.<\/p>\n<p><code>&lt;cftry&gt;<br \/>\n&lt;cfset mailerr = \"Email Sent\"&gt;&lt;!---default message ---&gt;<\/code><\/p>\n<p><code>&lt;!---Send to=\"#emaillist#\"---&gt;<br \/>\n&lt;cfmail<br \/>\nto=\"#emaillist#\"<br \/>\nfrom=\"somename@yourdomain.com\"<br \/>\nsubject=\"#FORM.subject#\"<br \/>\nserver=\"smtp.yourdomain.com\"<br \/>\ntype=\"html\"&gt;<br \/>\n&lt;p&gt;Dear Whoever,&lt;br \/&gt;&lt;br \/&gt;<br \/>\n#FORM.comment#&lt;\/p&gt;<br \/>\n&lt;\/cfmail&gt;<\/p>\n<p><code>&lt;cfcatch type=\"any\"&gt;<br \/>\n&lt;cfset mailerr = \"There was a problem sending the email.\"&gt;<br \/>\n &lt;a href=\"mailto:#emaillist#?subject=#subject#&body=#urlEncodedformat(FORM.comment)#\"&gt;<br \/>\n Webmail System Error: Please click here to send a manual Email via your PC.&lt;\/a&gt;<br \/>\n&lt;\/cfcatch&gt;<br \/>\n&lt;\/cftry&gt; <\/code> <\/p>\n<p>Then output the mailerr<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For those times when CFMail Just won&#8217;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 &hellip; <a href=\"https:\/\/www.esearing.com\/v2010\/2013\/02\/cfemail-alternatives-for-the-user\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,16,21,24],"tags":[63,58,62,64],"class_list":["post-953","post","type-post","status-publish","format-standard","hentry","category-code","category-coldfusion","category-problems-fixes","category-snippets-quick-code-tips-for-single-elements-attributes-or-details","tag-cfcatch","tag-cfmail","tag-cftry","tag-email"],"_links":{"self":[{"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/posts\/953","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/comments?post=953"}],"version-history":[{"count":4,"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/posts\/953\/revisions"}],"predecessor-version":[{"id":958,"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/posts\/953\/revisions\/958"}],"wp:attachment":[{"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/media?parent=953"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/categories?post=953"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/tags?post=953"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}