Welcome, Guest
  • Author Topic: Send Mail through PHP  (Read 708 times)

    Kevin

    • Server what's that
    • *
    • Posts: 6
      • View Profile
      • Email
    Send Mail through PHP
    « on: 10/11/02, 12:41 »
    Hello:
            I have read a tutorial found on this site and made it work. But I cannot customize it to only

    Name
    Subject


    I would like to send an email always to the same person (me). I just need the php script. I canīt make it to work.

    Thanks in advance for anyone who replies

    Musicman

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 2685
      • View Profile
      • Email
    Re:Send Mail through PHP
    « Reply #1 on: 10/11/02, 16:10 »
    <?

    $Name = $_POST[Name];   // these lines only  for php 4.1 and later
    $Subject = $_POST[Subject];

    mail("you@somewhere.com", "request from website", "$Name\n$Subject");

    print "status=ok";     // this is a lie ... ph does not detect mail errors :)
    ?>

    Musicman

    Kevin

    • Server what's that
    • *
    • Posts: 6
      • View Profile
      • Email
    Re:Send Mail through PHP
    « Reply #2 on: 10/11/02, 17:23 »
    Thanks MusicMan, I got it to work perfectly.