Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Posts
    138
    Thanks
    0
    Thanked 0 Times in 0 Posts

    how to put sendmail ?

    hi

    i got UNIX hosting wiht perl/cgi/PHP..

    now they have sent me the PHp sendmail settings..which is

    /usr/sbin/sendmail


    and i have the code from a site as



    <?php
    $to = "email@yahoo.com";
    $subject = "Hi!";
    $body = "Hi,\n\nHow are you?";
    if (mail($to, $subject, $body))
    {
    echo("<p>Message sent!</p>");
    }
    else
    {
    echo("<p>Message delivery failed...</p>");
    }
    ?>



    now where and how to put my send mail line in this above php mail script to run it?make it send an emal to email@yahoo.com??
    Move on....

  • #2
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts
    you shoudnt need to place the sendmail line, as the PHP mail() function should use it automatically... If not, you may need to look into fsockopen() method, or recomplile php with SMTP? im not sure tho.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •