Getting HTML form data from captive portal
-
Hi all,
I am working to make a feature rich! captive portal. Alongside the normal username and password, I have added a separate form to receive messages from users. Its a very simple fomr wiht name, email and message (textarea).
First I tried to use PHP's mail function, but soon I realised that unless the SMTP is activated its not possible to send emails (is this correct?) then I checked the forum and I found out making SMTP to work is quite difficult and its out of my knowledge.
Then I tried to simply save the content of the form in a file using 'file_put_contents' function of PHP. It appeared that the file was saved (since I got no php errors even while E_ALL level was active for error reporting). But the problem is I could not find this file anywhere on the disk (I tried to look in many folders in the shell…but no sucess).
So my question is, what is the simplest way to receive messages if somebody fills the form in the captive portal?
Thanks in advance!
-
So my question is, what is the simplest way to receive messages if somebody fills the form in the captive portal?
Why not using PHPMailer? https://github.com/PHPMailer/PHPMailer/
Works fine for me…
I use an Smarthost (with authentication) to sent my mails if special events happens.Works fine, even if you use Google as Relay.
P.S.: You will find great howto's for PHPMailer ;-)