From c5ebb24b391ec654a0b2be4b544f4d57866321f8 Mon Sep 17 00:00:00 2001 From: John Mizerek Date: Mon, 26 Jan 2026 13:33:40 -0800 Subject: [PATCH] Fix completeProfile.cfm syntax error Use mail() service inside cfscript instead of cfmail tag Co-Authored-By: Claude Opus 4.5 --- api/auth/completeProfile.cfm | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/api/auth/completeProfile.cfm b/api/auth/completeProfile.cfm index a5ebfde..53221ad 100644 --- a/api/auth/completeProfile.cfm +++ b/api/auth/completeProfile.cfm @@ -108,7 +108,7 @@ try { userId: { value: userId, cfsqltype: "cf_sql_integer" } }, { datasource: "payfrit" }); - // Send confirmation email + // Send confirmation email (non-blocking - don't fail if mail fails) confirmLink = "https://biz.payfrit.com/confirm_email.cfm?UUID=" & qUser.UserUUID; emailBody = "

Welcome to Payfrit, #firstName#!

@@ -118,19 +118,23 @@ try {

#confirmLink#

Thanks,
The Payfrit Team

"; - - - #emailBody# - + emailSent = false; + try { + mailService = new mail(); + mailService.setTo(email); + mailService.setFrom("admin@payfrit.com"); + mailService.setSubject("Welcome to Payfrit - Please confirm your email"); + mailService.setType("html"); + mailService.send(body=emailBody); + emailSent = true; + } catch (any mailErr) { + // Mail failed but profile was saved - continue + } - writeOutput(serializeJSON({ "OK": true, - "MESSAGE": "Profile updated. Please check your email to confirm your address." + "MESSAGE": emailSent ? "Profile updated. Please check your email to confirm your address." : "Profile updated." })); } catch (any e) {