Fixes an issue on Linux where the getenv call for overriding the 'to' address would potentially fail, when the $to parameter was an array.
Fixes an issue on Linux where the getenv call for overriding the 'to' address would potentially fail, when the $to parameter was an array.