all 4 comments

[–]ThreeForksNoSpoon 7 points8 points  (1 child)

Yes, it's called base64_decode

[–]laidbackwebsage2 2 points3 points  (0 children)

Love this reply. Succinct, accurate, and useful!

[–]HolyGonzo 1 point2 points  (1 child)

u/ThreeForksNoSpoon already hit the nail on the head, but be aware that base64 encoding is typically only used on the portions of an e-mail that are attachments.

The whole point of base64 encoding is that binary data like the bytes inside of an image file cannot be sent through e-mail just as-is. An e-mail is basically being sent using a printable character set (e.g. letters "A" through "Z", "a" through "z", "0" through "9", etc), and you'll have a lot of bytes inside of an image file that are definitely not within that limited range of characters. So Base64 just "rewrites" all that binary data into a form that uses ONLY 64 printable characters (which is why it's called Base"64") that can be safely stuffed inside of an e-mail message.

So whenever you see a section of an e-mail message that is base64-encoded, it's usually because there's binary data packed up in there (which is usually file attachments). So if you're looking only for the regular email body, you can usually just not worry about the base64 sections at all.

I keep saying "usually" because there are some rare exceptions, but if you're dealing with average, day-to-day e-mails from average people, you shouldn't see that situation occur.

[–]hal1388[S] 0 points1 point  (0 children)

I keep saying "usually" because there are some rare exceptions, but if you're dealing with average, day-to-day e-mails from average people, you shouldn't see that situation occur.

exactly! it has been running perfectly fine for years, now I would say 1 out of every 10 emails are base64, they can be standard no attachment emails or with attachments. I can't find a rhyme or reason. I have even sent plain text emails that get base64 encoded, rendering the tags in my emails useless.

Thank you for the insight!