PHP email reader script

Tuesday, September 20, 2022 at 4:57 PM

The script I have made allows me to read email sent to p@p97.ca

By default, it displays plain text and images (text/plain and image/*).

It also supports multipart/mixed and multipart/alternative to see both text and images in the same page.

This morning, I added rudimentary HTML support :

First, as my script is parsing the email, it sets a global variable to true if any HTML is found.
This adds a link to the webpage.

This link adds a &html parameter to the URL.

My code then parses the HTML if that parameter is set.

It is then displayed undecoded (I do not yet do HTML-sanitization to prevent <script>s).

When parsing multipart/related, it only displays the first part (which is usually HTML).

Name
Password

No need to register, just enter the same name and password every time.