Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    Getting HTML form data from captive portal

    Scheduled Pinned Locked Moved Captive Portal
    2 Posts 2 Posters 799 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

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post
        Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
        Privacy Policy · Cookie Policy