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

    Join Date
    Mar 2000
    Location
    Ontario, Canada
    Posts
    498
    Rep Power
    18
    This'll probably be the most rudimentary question I ever post, but I'm out of ideas. I'm having severe problems with mail(). I have a form set up to send me email when someone fills it in, but it won't send me jack squat! I've tried it with extra headers, without extra headers, different recipient addresses, different methods of holding the message and title/subject, even writing my own version of mail() with fsockopen(). The administrator on the machine claims that sendmail works fine, and I can send e-mail to my address on the server fine. What baffles me is why it won't send me any mail via the form. Could it be because I only have an alias, and not a full POP3 address? Any comments or suggestions would be greatly appreciated, hopefully some one will give me a workaround so I won't end up prematurely bald from ripping my hair out.

    (P.S.: It's PHP 3.0.16, if that makes any difference.)

    ------------------
    To alcohol! The cause of, and solution to, all of life's problems. -- Homer Simpson

    [This message has been edited by cka (edited July 28, 2000).]

    [This message has been edited by cka (edited July 28, 2000).]
  2. #2
  3. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    Perth West Australia
    Posts
    757
    Rep Power
    15
    can you post your script?
    here is one that works:

    <?php
    $msg ="You have received a request for information from the ************** online messenger nn :Referrers message reads :n n $messagenn";
    $msg .="Received from:t $Cname n";
    $msg .="Phone No:t $Cphone n";
    $msg .="Fax No:t $Cfax n";
    $msg .="E-mail:t $Cmail n";
    $recipient ="you@yourdomain.com.";
    $subject = "$Csubject";
    $mail_headers ="From: ********** Mailer <>n";
    $mail_headers .="Reply to: $Cmailn";

    mail ($recipient,$subject ,$msg ,$mail_headers);
    $Orecipient ="anoter@address.com";
    mail ($Orecipient,$subject ,$msg ,$mail_headers);
    ?>

    (where $Cname etc are values returned from form fields etc)

    If that does not work - you have other problems


    ------------------
    Simon Wheeler
    FirePages -DHTML/PHP/MySQL
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    Ontario, Canada
    Posts
    498
    Rep Power
    18
    OK, thanks.. I'll give that code a try. I just messed up something with fgets/fputs to see what the smtp server spit out, and as far as I can see it works fine...


    It's a no-go...


    By the way, my last script returned an odd looking line from the sendmail server... "Queued: [random string here]" <-- could this be why it won't send my mail?
    ------------------
    To alcohol! The cause of, and solution to, all of life's problems. -- Homer Simpson

    [This message has been edited by cka (edited July 28, 2000).]

    [This message has been edited by cka (edited July 28, 2000).]
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    Ontario, Canada
    Posts
    498
    Rep Power
    18
    Nevermind, I think I found out what's wrong... I was reading comments in the online php manual on php.net, and someone had a post there that was incredibly similar to my own problem. It seems there's some sort of bug in mail() on solaris machines, and that's what the webserver i work on uses. PHP even has trouble spawning sockets to the smtp server...

    ------------------
    To alcohol! The cause of, and solution to, all of life's problems. -- Homer Simpson

Similar Threads

  1. mail() return-path problems
    By elyk in forum PHP Development
    Replies: 7
    Last Post: February 20th, 2004, 10:24 PM
  2. Replies: 3
    Last Post: February 16th, 2004, 08:29 AM
  3. Help with script
    By akastarlight in forum Perl Programming
    Replies: 1
    Last Post: February 6th, 2004, 06:55 AM
  4. PHP mail problems
    By Morrigan in forum PHP Development
    Replies: 2
    Last Post: December 17th, 2003, 01:23 PM
  5. Replies: 0
    Last Post: November 25th, 2003, 04:45 AM

IMN logo majestic logo threadwatch logo seochat tools logo