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

    Request USER ID FORM

    Scheduled Pinned Locked Moved Captive Portal
    9 Posts 3 Posters 4.4k 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.
    • J
      jleipert
      last edited by

      HI -
      I'm trying to create a form for users to request an new  account.  They would fill out their name password email so forth….  and they form would be emailed to the account manager  tech@info.com.

      this is my php code to test the email

      mail('techinfo@mail.com', 'test', 'hello', 'hello');
      ?>

      but it doen't work an ideas

      1 Reply Last reply Reply Quote 0
      • W
        wallabybob
        last edited by

        Does php know of a SMTP server to send the mail to?

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

          Hi -
          I'm using 2.0 - I did fill out the notification setting in pfsense. and it did send out a test message?

          Thanks

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

            Ok…...I was doing some reading mail() function does not do smtp authencation. but thats what I need to do.  I did read that Pear::MAIL
            has smtp auth.  is there a right way to do it in pfsense

            SAMPLE

            $host = "mail.example.com";
            $username = "smtp_username";
            $password = "smtp_password";

            $headers = array ('From' => $from,
              'To' => $to,
              'Subject' => $subject);
            $smtp = Mail::factory('smtp',
              array ('host' => $host,
                'auth' => true,
                'username' => $username,
                'password' => $password));

            $mail = $smtp->send($to, $headers, $body);

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

              I also saw pfsense has a function called file_notice('test, 'test message');

              can i use this someway

              1 Reply Last reply Reply Quote 0
              • GertjanG
                Gertjan
                last edited by

                Well,
                When I installed pfSense 2.0, it was asking about some smtp setup.
                I received a mail from it when done.

                This is a test message from pfSense.  It is safe to ignore this message.

                So, I tend to say: yes.

                No "help me" PM's please. Use the forum, the community will thank you.
                Edit : and where are the logs ??

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

                  Yeah - I know the test email works.
                  But I'm trying to create a custom user request form that will email to the "admin" but it needs to be smtp auth.

                  1 Reply Last reply Reply Quote 0
                  • GertjanG
                    Gertjan
                    last edited by

                    The mail message I was talking about above, was send with this setup:

                    This means that authentication by submission - sending mail on port 587 - with user name and password, is fully supported by pfSense.

                    The only limit is you and your PHP form  ;)

                    Btw: for all the mail possibilities, look in
                    /etc/inc/notices.inc  (take a look at lines 286 -> 332)
                    /etc/inc/smtp.inc
                    /etc/inc/sasl.inc
                    and more, if needed.

                    No "help me" PM's please. Use the forum, the community will thank you.
                    Edit : and where are the logs ??

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

                      Thanks! haha
                      I'll look in that direction!

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