SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast appy's Avatar
    Join Date
    Feb 2002
    Location
    UK
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Mail Error: Server config maybe?

    Hi All,

    I got a lil job yesterday to simply send some form values by email. Simple enough, done it loads of times. Tested it all out on my server, no probs! Couple of cosmetic changes and put in on clients server. And the problems started!

    My first error checking for incomplete fields falled over so I whipped up a phpinfo() page and found they are running PHP 4.0.6. So first off was changing my $_POST variables to $HTTP_POST_VARS and the error checking worked. So checked my inbox, but no mail recieved. Tried a couple of futile tweaks, again no joy. So I decided to create a page with only the mail function in and nothing else.

    And still no email recieved Works fine on my server. The client uses their server for much more than public web site, they do some systems analysis or something, so I guess it is part of their server configuration which they have so far tailored to their means, does anyone have any ideas how I could check that their server can actually send emails at all or am I not being compatible with the PHP 4.0.6 or any other ideas?

    This is my first job with this client and I was hoping to make a good impression on a simple job but it's just not happening

    Thx

  2. #2
    SitePoint Evangelist worksdev's Avatar
    Join Date
    Mar 2002
    Location
    Central, PA - originally from Monterey, CA
    Posts
    497
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi appy:

    Checking the sendmail path is one thing to do. Also to help trouble shooting you can add error checking in your mail function. It should return a true if it was successfully accepted for delivery (not nesc. sent by the server.)

    I have been using a very nice class called:

    phpMailer:
    http://phpmailer.sourceforge.net/

    It makes it easy to configure for sending your mail by smtp. This has helped me on a few servers where I could not get the built -in php mail function to work. (I'm not sure if this class will work on an older version of PHP.)

    Hope this helps somewhat.

    Best Regards,
    worksdev
    Church Website Design by Enlighten Web Services -
    Web design-hosting-support for Christian ministries
    Friendly Community of Webmasters
    Christian Websites :: Christian Web Design

  3. #3
    SitePoint Enthusiast appy's Avatar
    Join Date
    Feb 2002
    Location
    UK
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thx for the reply, I have just tried the error checking using some script i found in a another thread:

    And the result is that the page says "Mail sent successfully" but the email still never arrives. I've tried the same page on my own server and the email is recieved. I might have to take a good look at the phpMailer option. It's a shame as it seems a v.good class but a bit of overkill for my application

    Thx again worksdev

  4. #4
    SitePoint Enthusiast appy's Avatar
    Join Date
    Feb 2002
    Location
    UK
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Aaaarghg! I got aroung this problem with a temporary work-around by having the appropriate frame META refresh/redirect to the PHP contact page on my own server. Now I've just had the customer call to say it doesn't work!?! After questioning the clients I have found also that their own original HTML mailto: link does not work either!

    Am I right in saying that if a simple mailto: link does not work, the only thing that can be wrong (& I have checked & rechecked their mailto: syntax) is that their server cannot accept email to the specified mailto: address?

    By the powers of greyskull, this is doing my head in!

    P.S. MODS: I am re-posting this in the Configuring Your Server forum (http://www.sitepointforums.com/showt...hreadid=109863), as i believe now that it is a server set-up problem. Feel free to delete this post if you wish. thx
    Last edited by appy; May 20, 2003 at 10:26.


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
  •