The modified functions_email code that you posted shows a syntax error:
Code:
    // Identify and Read the template file for the type of message being sent
    $langfolder = (strtolower($_SESSION['languages_code']) == 'en' or 'pt') ? '' : strtolower($_SESSION['languages_code']) . '/';
Removing the "or 'pt'" would be a good starting point.

But, I should point out that the "Email Welcome Preview" feature is removed in the next version of Zen Cart. There are no plans to support it, nor to fix any issues which may exist with it.
As I've already indicated, the correct way to test the sending of (any) emails is to actually send them.