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

Thread: mail codes

  1. #1
    Banned
    Join Date
    Jul 2002
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    mail codes

    I try to use E-mail system. I want you to check my code.

    my php is 4.2

    my php editor says "$from .="<". $mailadr .">";
    mail($sendto, $subject, $msg, $from);" These lines are wrong.

    I tested so many times.

    It is not working

    Thank you for your time



    <?php
    $sendto = "itohideo@domaindlx.com";
    $yourname = $_POST["yourname"];
    $mailadrs = $_POST["mailadrs"];
    $subject = $_POST["subject"];
    $msg = $_POST["msg"];
    $no = 0;
    if ($yourname == "") {
    print("Please Enter your Name<br>\n");
    $no = 1;
    }
    if ($mailadrs == "") {
    print("Please Enter your mailad<br>\n");
    $no = 1;
    }
    if($subject == "") {
    print("Please Enter your title<br>\n");
    $no = 1;
    }
    if ($msg == "") {
    print("Please Enter your comments<br>\n");
    $no = 1;
    }
    if ($no != 1) {
    $from = "From:" .$yourname. "\n";
    $from .="<". $mailadr .">";
    mail($sendto, $subject, $msg, $from);
    } else {
    echo "Mail did not send.";
    }
    ?>

  • #2
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,280
    Thanks
    4
    Thanked 83 Times in 82 Posts
    1234, this will be your first and only warning. Stop creating multiple posts with the same question. You are in violation of our forum rules.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster


  •  

    Posting Permissions

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