Thread: Email Script

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    51
    Rep Power
    15
    Im trying to make a clause in my form action script that sends an email to the person who signed up acknowleging that they filled out the form and everything... here is my code so far:

    mail("$email", "RPGSWAP.COM Registration Success!",
    "Thank you $name, for joining RpgSwap.com! Enter Message Body Here. Include registration info, password, and information about all kinds of stuff.");


    $email is a variable assigned to the form's email field.

    for some reason this doesnt work, im looking for help. Thanks

    Sam
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Seattle, WA,USA
    Posts
    84
    Rep Power
    15
    Try this:
    $message = "Thank you $name, for joining RpgSwap.com! Enter Message Body Here. Include registration info, password, and information about all kinds of stuff";

    mail($email,"RPGSWAP.COM Registration Success!", $message);

    just a suggestion to simplify your code...
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Pune, Maharashtra, India
    Posts
    86
    Rep Power
    15
    mail() function works only if Sendmail is coorectly setup otherwise not , hence check for it.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    51
    Rep Power
    15
    didnt think of that, i bet sendmail isnt set up. doh!!
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    51
    Rep Power
    15
    sendmail is set up, any idea why it wont send mail to the variable defined email address?

    sam
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Washington, USA
    Posts
    52
    Rep Power
    15
    Not sure if this is problem or not, but you were missing the From and new line in the header:

    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
    <?
    $to = $email;
    $subject = "RPGSWAP.COM Registration Success!";
    $body = "Thank you $name, for joining RpgSwap.com! Enter Message Body Here. Include registration info, password, and information about all kinds of stuff.";
    $header = "youremail@yourisp.comn";
    mail($to, $subject, $body, $header);
    ?>
    [/code]


    ------------------
    <UL TYPE=SQUARE>
    <LI> TD Scripts
    <LI> Script School
    <LI>php-scripts
    </UL>

    [This message has been edited by TDavid (edited August 24, 2000).]
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    51
    Rep Power
    15
    i dont think that was the problem.
  14. #8
  15. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15
    rpgswap.com,

    try a simple mail script and see wether your sendmail is working properly or not.


    test.php3

    <?
    $to="you@yourmailc.com";
    mail($to,"Test mail","hello from Php");
    echo " mail has been sent";
    ?>



    ------------------
    SR -
    webshiju.com
    www.jobxyz.com-IT Career Portal
    ezipindia.com--WebStudio


    "The fear of the LORD is the beginning of knowledge..."

Similar Threads

  1. Receiving attachments sent from PHP script
    By rtoews in forum PHP Development
    Replies: 1
    Last Post: January 22nd, 2004, 03:05 PM
  2. strange behaviour of perl email sending script
    By rjstephens in forum Perl Programming
    Replies: 0
    Last Post: January 22nd, 2004, 08:41 AM
  3. email attachment cgi script
    By oluckboy in forum HTML Programming
    Replies: 1
    Last Post: January 15th, 2004, 02:39 PM
  4. Shell email script Irix after rsync
    By the_idol in forum UNIX Help
    Replies: 0
    Last Post: January 15th, 2004, 01:37 PM
  5. Replies: 0
    Last Post: January 6th, 2004, 12:53 PM

IMN logo majestic logo threadwatch logo seochat tools logo