SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2004
    Location
    England
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Using mail function on my server

    Hi.

    I have setup a server on my home PC with php/mysql/etc, using the phpdev install. Everything seems to be working ok, except for the mail function. After a short wait after ive hit the submit button, its returns saying "Warning: Failed to Receive in e:\phpdev\blabla\reg.php on line 92". That line is part of the register bit where it sends out an email.

    I understand this has something to do with the "php.ini" file, around line 500. I changed the stuff to my ISP's (Nildram) SMTP ip, and under that added smtp_port 25, being as thats the post it said it uses.

    This did not fix anything, and i got the same error message coming back.

    If anyone knows a fix for this i would greatly appreciate it,

    Thanks, Cobra

  2. #2
    SitePoint Zealot shenkong's Avatar
    Join Date
    Sep 2004
    Location
    China
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    give us your error string..

    I think your ISP hold your mail back

  3. #3
    SitePoint Enthusiast
    Join Date
    Jul 2004
    Location
    England
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your reply.

    The error i get is"Warning: Failed to Receive in e:\phpdev\www\public\testing\login_test_new\register.php on line 92"

    This is the mail part of the script

    Code:
    mail($email, $subject, $message,
            "From: MyDomain Webmaster<admin@mydomain.com>\n
            X-Mailer: PHP/" . phpversion());  
        echo 'Your membership information has been mailed to your email address!
        Please check it and follow the directions!';
    line 92 is the "X-Mailer: PHP/....." bit

  4. #4
    SitePoint Enthusiast
    Join Date
    Jun 2004
    Location
    UK
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Good luck with trying to get the mail working on phpdev. Its a pig of a set up and not good for pro development. There are thousands of posts in the phpdev forums about this issue and also perl and mason modules. At the end of the day its not woth the hassle when so many bundles exist for free. phpdev must be the worst. If you need a bundle try foxserve. I have seen many posts promoting this though theres nothing better than standard Apache/MySQL/php install. Its not that hard and once you have managed it, save copies of httpd.conf and php.ini and should you ever crash its twice as easy the next time.

  5. #5
    Non-Member
    Join Date
    Oct 2004
    Location
    downtown
    Posts
    145
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also note that some ISP (AOL for example) disable port 25 to prevent spammers. There are quite a few now that disable this port, you might want to check up with your ISP?

    But don't know if this is the problem since I've never installed PHP with what you've used.

  6. #6
    SitePoint Enthusiast
    Join Date
    Jul 2004
    Location
    England
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well on the Nildram Support page, it says "SMTP
    Server: smtp.nildram.co.uk
    Port: 25
    No authentication required, non SSL connection."

    There has to be a way to get this working without starting over again

  7. #7
    Non-Member
    Join Date
    Oct 2004
    Location
    downtown
    Posts
    145
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I noticed in the script you posted, there isn't a new line after you have the php version? ie

    PHP Code:
    mail($email$subject$message,
            
    "From: MyDomain Webmaster<admin@mydomain.com>\n
            X-Mailer: PHP/" 
    phpversion())."\n"
        echo 
    "Your membership information has been mailed to your email address!
        Please check it and follow the directions!\n"

    I've added one for you, so try the above to see what happens? This has been a known cause for getting 'unknown' errors


    If it's no use, get back to this thread again.

  8. #8
    SitePoint Enthusiast
    Join Date
    Jul 2004
    Location
    England
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nope, i trried what u said and im getting the same error


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
  •