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 5 of 5
  1. #1
    New Coder
    Join Date
    Aug 2006
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    can't recieved mail

    hi,

    i found one php cording and that work without error but this thing is i can't recieved feedback from site pls help me to figure that out


    <?php

    $message = "Name : ".$_POST['main_name']. "\n". "Email : ".$_POST['email']. "\n"."Comments : ".$_POST['textarea']."\n";
    $headers = "From: TOSOJK <info@theothersideofjohnkeells.com>\r\n";
    $date = date("l, F d, Y h:i" ,time());
    $to="info@theothersideofjohnkeells.com";
    $subject="TOSOJK - Feedback";
    mail($to,$subject,$message,$headers);
    header( "Location: confirmation.html");

    ?>

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,546
    Thanks
    8
    Thanked 1,093 Times in 1,084 Posts
    Not all webhosts have PHP sendmail enabled.
    Contact your webhost and find out how they handle contact form emails.
    Ask them if they use PHP (or maybe they use ASP), or they might have
    a special form method they want you to use.

  • #3
    New Coder
    Join Date
    Aug 2007
    Location
    Wagga, Australia
    Posts
    59
    Thanks
    0
    Thanked 1 Time in 1 Post
    does the web server have an smtp server running on it? if it doesn't you will need to set one up or get a hosted one, if you do that you will need to edit your php.ini

  • #4
    Regular Coder
    Join Date
    Mar 2006
    Posts
    200
    Thanks
    27
    Thanked 2 Times in 2 Posts
    Hello,

    I had enormous problems using the php mail() function. No-one could tell me what was wrong with my code, it worked fine to my email address, but ,most other e-mail addresses simply blocked it.

    I never got my mail() function to deliver to hotmail addresses or aol addresses.

    In the end, I sat down and re-wrote it in CGI and it got received first time by all email addresses.

    I'm not saying give up...who knows...you might have more luck than me...but I just thought I should mention that I was told that many mail servers reject emails sent from php scripts. I think that's why mine didn't work.

    Nicky

  • #5
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,546
    Thanks
    8
    Thanked 1,093 Times in 1,084 Posts
    Nicky,

    I know what you're talking about, and it ultimately ends up being a
    server issue. I would think in most cases, an email to the webhost would
    prompt them to do something. I wonder if they sometimes create a
    new webhost account and don't have some things set-up correctly in
    the configuration.

    I had this problem with www.cleverdot.com I emailed them and a few days
    later, my problems went away. They never did email back with an answer
    to what they did, but they did something. I'm back to using PHP for
    sending forms without any problems.

    I wish I could afford my own dedicated server, my own webhosting, and
    my own dedicated connection ... I'm sick of relying on other people for
    webhosting, and dealing with configuration issues.


  •  

    Posting Permissions

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