First, never use env() except withing config() files. You won't be able rely on env() calls if you cache your config, which is highly recommended in production. If the config is cached, all calls to env() will return null. You should use the config() helper to retrieve the value, not env(). Please see the warnings here: https://laravel.com/docs/5.7/configuration#configuration-caching
I don't think you can get what you're after at this point. You're hooking into the MessageSending mail event, which will probably only contain the actual email data (name, subject, attachments, etc), not the raw invoice data. You'll need to override where Spark is actually creating the invoice pdf and sending the email. Here's one way that looks like it would work: https://laracasts.com/discuss/channels/spark/add-invoice-table-information-to-pdf-invoice-without-hacking-vendor-files