Small update:
I've been playing around with things. Not too scared of going into php files and making changes myself. I was able to work around the issue by going into 'include/pear/Mail.php' on line 255 and changing it from this:
$addresses = Mail_Parse::parseAddressList($recipients, 'localhost', false);
to this:
$addresses = Mail_Parse::parseAddressList($recipients, 'UTF-8', false);
That is surely not the right way to do things π (if it's stupid and it works it's not stupid right?)
Would still like some more information as to just why exactly this is happening and why the charset being passed to parseAddressList is hard coded as 'localhost'. Probably just some stuff I don't yet understand about php or something. Or maybe an erronius regex replace by the upgrade script based on an ENV var the was not there/misconfigured? I'm running on Freebsd 12.3 if that means anything to anyone but I assume that is largely immaterial. No idea what to make of this right now frankly π
It's become clear to me that the rest of the stack trace might be useful after going through it all myself. Also nothing sensitive for me to redact which is why i usually truncate logs like this when posting on forums. Here's the full stack trace:
Fri Feb 11 09:51:07.605551 2022] [php:error] [pid 72952] [client 192.168.131.7:34132] PHP Fatal error: Uncaught ValueError: mb_convert_encoding(): Argument #2 () must be a valid encoding, localhost given in /usr/local/www/apache24/data/osticket/include/class.charset.php:64
Stack trace:
#0 /usr/local/www/apache24/data/osticket/include/class.charset.php(64): mb_convert_encoding('bbryant', 'localhost', 'ISO-8859-1')
#1 /usr/local/www/apache24/data/osticket/include/class.format.php(60): Charset::transcode('bbryant', 'ISO-8859-1', 'localhost')
#2 /usr/local/www/apache24/data/osticket/include/class.mailparse.php(584): Format::mimedecode('bbryant', 'localhost')
#3 /usr/local/www/apache24/data/osticket/include/pear/Mail.php(255): Mail_Parse::parseAddressList('bbryant@lmtribu...', 'localhost', false)
#4 /usr/local/www/apache24/data/osticket/include/pear/Mail/smtp.php(291): Mail->parseRecipients('bbryant@lmtribu...')
#5 /usr/local/www/apache24/data/osticket/include/class.mailer.php(587): Mail_smtp->send('bbryant@lmtribu...', Array, '--=_cc056d31b7a...')
#6 /usr/local/www/apache24/data/osticket/include/class.email.php(190): Mailer->send(Array, 'osTicket test e...', '<p>aasdf</p>', Array, Array)
#7 /usr/local/www/apache24/data/osticket/scp/emailtest.php(38): Email->send('bbryant@lmtribu...', 'osTicket test e...', '<p>aasdf</p>', NULL, Array)
#8 {main}
thrown in /usr/local/www/apache24/data/osticket/include/class.charset.php on line 64, referer: https://help.lmtribune.com/scp/emailtest.php