SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: email php

  1. #1
    SitePoint Member
    Join Date
    Jun 2005
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    email php

    hi all,

    i am doing a project on email php and after i've installed all the necessary programs on my station, i can't send email. however, it show the information i've input and these confirmation are done in the php codes.

    when i checked my mail, there is no new mail sent by the php and shows no error message at all. what can i do to solve this problem.

    my php codes looks like this:

    <?PHP
    if(($_GET['sender_name'] == "") ||
    ($_GET['sender_email'] == "") ||
    ($_GET['message'] == ""))
    {
    header("Location:contact.htm");
    exit;
    }

    $to="sunset_bay_85@yahoo.com";
    $subject="PBL Help Desk";

    $msg="E-MAIL SENT FROM PBL Site\n";
    $msg.="Sender's Name:\t$_GET[sender_name]\n";
    $msg.="Sender's E-Mail:\t$_GET[sender_email]\n";
    $msg.="Message:\t$_GET[message]\n";

    $mailheaders="From: My Site <sunset_bay_85@yahoo.com>\n";
    $mailheaders.="Reply-To: $_GET[sender_email]\n";
    $mailheaders.="Message: $_GET[message]\n";
    //$sendmail_from = mail($to,$subject,$msg,$mailheaders);
    //ini_set($sendmail_from, 'mail@bobos.com');
    mail($to,$subject,$msg,$mailheaders);

    ?>

    <html><head>
    <title>Temasek Polytechnic Online PBL Survival Kit</title>
    </head><body>
    <H1>The following email has been sent/H1>
    <p><strong>Your Name/strong><br>
    <? echo "$_GET[sender_name]"; ?>

    <p><strong>Your Email Address/strong><br>
    <? echo "$_GET[sender_email]"; ?>

    <p><strong>Message/strong><br>
    <? echo "$_GET[message]"; ?>

    </body></html>

    and my html code looks like this:
    <form action="helpdesk.php" method="GET" name="HelpDesk" id="HelpDesk">
    <p>&nbsp;</p>
    <p>From: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input name="sender_name" type="text" id="sender_name" size="20">
    <br>
    <br>
    Your Email Address: &nbsp;&nbsp;
    <input name="sender_email" type="text" id="sender_email" size="30">
    <br>
    <br>
    Your message</p>
    <p>
    <textarea name="message" cols="50" wrap=virtual rows="10" id="message"></textarea>
    </p>
    <p align="center">
    <input type="submit" name="Submit" value="Submit">
    <input name="Reset" type="submit" id="Reset" value="Reset">
    </p>
    </form>

    please help me out....
    desperate sunsetbay

  2. #2
    SitePoint Member
    Join Date
    Jun 2005
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    first you upload your code on site directory which have permission to msend mail then run this page on browser at same path and the check your mail account


    if you run this page on local PC then this page can not send mail because you have no permission to send mail on network.

  3. #3
    SitePoint Member
    Join Date
    Jun 2005
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    and you write codes like this;


    $_GET['sender_name']\n";
    $_GET['sender_email']\n";
    $_GET['message']\n";


Bookmarks

Posting Permissions

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