I'm hitting the heap size limit when converting attachments to base64. I've already put it in a future and running at 3xheap. What I want to do is get the size of the attachment prior to conversion and deal with it another way, but for some reason I can't seem to find any way to get the size of it? I've searched and can't seem to find an answer to this issue... surely I'm not the lucky one!
The full picture is I get inbound emails with attachments, I do some processing around the contents and then I need to send an email out to people. So I have access to both the inbound and outbound emails, I just can't find a way to get the size of anything in bytes. I'd be happy with the total email size including attachments, or just individual attachment sizes. Any help would be much appreciated!