How would I email someone using the mail() function?
The simplest solution would be a mailto link. You can populate it with a form. Then people get to send the feedback from their own email. This also provides an avenue for you to reply to them.
@Baconman321 a quick google search yielded this https://www.arclab.com/en/kb/php/how-to-test-and-fix-php-mail-function.html I don't know php. However If this function is supposed to send an email from the server. This probably does not work from repl. Most hosting sites including google compute engine do not allow you to send mail on the normal port.
@Baconman321 I don't think there's any way that you could use php to accomplish this. I suggest you look into mailto links. Using a mailto link makes it very easy to write a HTML form that pre populates an email. On submission it will open the user's email client. They just have to press send. If need more help with this I could write an example.
Also maybe add a link to the home page on each page.
@west Ok so I got sh: 1: /usr/sbin/sendmail: not found when I tried to mail. At least it is trying to work. However, when I try to install the sendmail package(which I learned I needed), but it gives the error:E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?