Thanks for reading my Velocity content! Much, much more to come, once I put the finishing touches on my some extra-long drafts.
Your code is fine, but a trifle repetitive. You already haveextracted, so use it:
#set($name = $lead.FirstName) #if( $name.isEmpty() ) Friend #else $name.substring(0,1).toUpperCase()$name.substring(1).toLowerCase()## #end
The problem is surely that you're using Send Sample. You can't use samples to test Velocity unless there's no dependency onat all (obviously not the case here). Use real emails or Preview-By-List in the UI (create a static list and add test leads to it).
P.S.and are not decomposition-aware, so they're not as safe as people assume when dealing with accented Latin-1 characters. This affects Java as well, so it's not a Velocity-specific or Marketo-specific problem, but it is real. If you don't know what this all means, wait for an upcoming post.