Custom Email Greeting token doesn't work
Any chance you don't have smarty enabled for civiMail so your capture-assigns and ifs aren't working in the mail?

Try checking your civicrm.settings.php file and look for the line 

define( 'CIVICRM_MAIL_SMARTY', 1 );


as per https://backofficethinking.com/blog/tip-how-personalize-emails-civicrm. If you don't find it, or if it's set to 0, you'll need to add/change it for this to work.