Ok I have a complex issue. I will try to explain clearly.
I am forwarding an email from google to a php script. If I use an “@” symbol it encodes it to base 64 as you see the example below. I can decode it but sometimes emails do not have the “@” symbol so it DOES NOT ENCODE IT IN THE EMAIL… and if I run the base64 script in my php code all the time it will decode even when it doesn’t have to and mess up the text.
Make Sense?
Below is an example that gets encoded because there is an “@” symbol used:
Example ONE I sent this: sample@sample.com
=============================================
The email came out like this.
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
Content-Transfer-Encoding: base64
U2FtcGxloXNhbXBsZS5jb20NCg0KLS0NClNlbnQgdXNpbmcgU01TLXRvLWVtYWlsLiAgUmVwbHkg
dG8gdGhpcyBlbWFpbCB0byB0ZXh0IHRoZSBzZW5kZXIgYmFjayBhbmQgIA0Kc2F2ZSBvbiBTTVMg
ZmVlcy4NCmh0dHBzOi8vd3d3Lmdvb2dsZS5jb20vdm9pY2UNCg==
------------------------------------------------------
------------------------------------------------------
Example TWO I sent this: Hello World
======================================================
The email came like this:
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
Hello world
How can I test if its encoded and then how can I encode it correctly?
Thanks so much.
-Ed
The answer is just there, look at the following header:
It tells you that the content is encoded using base64 encoding.