SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict Phil-man's Avatar
    Join Date
    Nov 2000
    Posts
    291
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Strange Problem w/E-mailing within domain

    Hello:

    I have a script (written in PHP, but I don't think that matters) that e-mails form input to an administrator. For illustration purposes, I'll say the script is at http://www.domain.com/script.php and the administrator's e-mail address is admin@domain.com. We're using Linux and Apache v1.3.6.

    Here's the problem. Using PHP's mail function and attempting to send the results to the above-mentioned e-mail address, it fails every time (yes, it's a valid e-mail address). In fact, it fails for ANY e-mail address @domain.com, and yet it WORKS for ANY other e-mail address (like admin@otherdomain.com).

    So just plain old e-mail tests to admin@domain.com work fine. And the script works fine. But somewhere there's a problem with the script sending the e-mail within the domain where the script resides.

    Very confused and very grateful for any help you might have.

  2. #2
    SitePoint Zealot ivaluehost's Avatar
    Join Date
    Oct 2002
    Posts
    124
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When you tested the form, did you fill out your email field? 'cause if you didn't, then your script couldn't send your email since it didn't have an email server to send it from...I saw it happened to some people.
    Jake - iValueHost, LLC - http://www.ivaluehost.net
    Poweful, Reliable, & Affordable Web Hosting Solutions
    $3.95/MO. 350MB, 10GB Transfer | $5.95/MO. 500MB, 15G Transfer

  3. #3
    SitePoint Addict Phil-man's Avatar
    Join Date
    Nov 2000
    Posts
    291
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The destination e-mail address is hard-coded into the script, and PHP handles the mailing from the server on which it resides. As for where the e-mail comes from, if an e-mail address is supplied, then it is used. If not, it defaults to an address on the server.

    Again, everything works fine EXCEPT when the hard-coded e-mail address is an address on the same domain where the script is being run.

  4. #4
    SitePoint Member
    Join Date
    Oct 2002
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    your machine may not be able to resolve @domain.com to an actual mail server, first, try to find out your domain's mail server name, test resolution with

    nslookup mailservername.domain.com

    and if it works, change


    admin@domain.com
    to
    admin@mailservername.domain.com

    gene


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
  •