Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Getting HTML form data from captive portal

    Scheduled Pinned Locked Moved Captive Portal
    2 Posts 2 Posters 682 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      MacandraNet
      last edited by

      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!

      1 Reply Last reply Reply Quote 0
      • J
        jhochwald
        last edited by

        @MacandraNet:

        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 ;-)

        Regards

        /JH

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.