Formmailer apache server

Discussion in 'HOWTO-Related Questions' started by Joe-Montana, Nov 2, 2005.

  1. Joe-Montana

    Joe-Montana New Member

    Hey All

    Running Mandrake 10.2 LE with apache
    and need some help here, i´m trying to make a simple php form mailer.

    #########Form Mailer####################

    <?


    $message ="navn=$name $tlf $mail $bem";


    mail( "info@noname.dk", "Mail Fra Support Question",
    $message, "From: $email" );
    header( "Location: http://www.noname.dk/files/thanks.php" ,main );
    ?>

    ##################################
    Note" tryed to put this in my formmailer ini_set("SMTP","smtp.mail.dk");"

    The thing is, that i think i have to set something up on my Box/apache server, so i wil be able to send.

    I´ve looked at the php.ini, file to se if there is any thing there.

    Don´t know if this is right

    ######## PHP.INI ####################

    [mail function]
    ; For Win32 only.
    SMTP =

    ; For Win32 only.
    sendmail_from =

    ; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
    sendmail_path = /usr/sbin/sendmail -t -i

    ####################################

    If i run the thing on my webhotel at the ISP server all works fine

    I know, when i just want to sendt mail from i normal mail client like Thunderbird, i just provide it with my isp gateway "smtp.mail.dk and the af password.

    So how do i get my box to send mail direct from my website

    Any one????

    Thanks in advance

    Joe Montana
     
  2. falko

    falko Super Moderator

    If you're trying to send from the same host where the mail server is on, you don't need a username and password. You can simply use PHP's mail() function.
     
  3. Joe-Montana

    Joe-Montana New Member

    Thanks, all is working fine now, Falko you are the best.
     
  4. falko

    falko Super Moderator

    Good to hear that! :D
     

Share This Page