Request USER ID FORM



  • 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



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



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

    Thanks



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



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

    can i use this someway



  • 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.



  • 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.



  • 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.



  • Thanks! haha
    I'll look in that direction!


Log in to reply