SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    is craving 'the potato' slayerment's Avatar
    Join Date
    Nov 2002
    Location
    Scottsdale, Arizona, USA
    Posts
    603
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Q: Mail works on one server but not the other

    Does anybody know why this would work on one server but not the other one?

    PHP Code:
     $toaddress "quinton@slayerment.com";
     
    $mailsubject "Web Contact Message";
     
    $mailmessage "Name: ".stripslashes($_POST['name']). "\n" 
                 
    ."Phone: ".stripslashes($_POST['phone']). "\n" 
         
    ."Company: ".stripslashes($_POST['company']). "\n" 
                
    ."Email: ".stripslashes($_POST['email']). "\n"
       
    ."Fax: ".stripslashes($_POST['fax']). "\n"
       
    ."Message: ".stripslashes($_POST['message']). "\n";
     
    $headers "From: ".$_POST['name']." <".$_POST['email'].">";
    mail($toaddress$mailsubject$mailmessage$headers); 
    Thanks!

  2. #2
    SitePoint Addict
    Join Date
    Oct 2004
    Location
    Southwest US
    Posts
    203
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you getting any errors while running the script on the non-working server?

  3. #3
    Forum Buyer
    Join Date
    Jun 2004
    Location
    United States
    Posts
    811
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Define "not working" do you mean you never get the mail in the intended box or do you get errors?

    If you're not getting the mail in the intended box and you're not getting any errors it may just be that your new server's IP is blacklisted as an open relay machine. Also if it's a test machine (you're doing it on a home PC) most home broadband ISP IPs (charter, earthlink, etc) are blacklisted automatically.
    Founder/Admin of a pretty decent chat forum
    Download free winterboard themes for your iPhone
    I run sites powered by vbulletin and one about the HTC Jetstream.

  4. #4
    Employed Again Viflux's Avatar
    Join Date
    May 2003
    Location
    London, On.
    Posts
    1,127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    At the risk of stating the obvious, you have a SMTP server installed and configured properly (verified to be working) on the machine in question?

  5. #5
    SitePoint Evangelist Daijoubu's Avatar
    Join Date
    Oct 2002
    Location
    Canada QC
    Posts
    454
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Show use the phpinfo() of both servers
    Btw, only windows use SMTP, linux have thier local sendmail
    Speed & scalability in mind...
    If you find my reply helpful, fell free to give me a point

  6. #6
    Forum Buyer
    Join Date
    Jun 2004
    Location
    United States
    Posts
    811
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sendmail is an SMTP server
    Founder/Admin of a pretty decent chat forum
    Download free winterboard themes for your iPhone
    I run sites powered by vbulletin and one about the HTC Jetstream.

  7. #7
    SitePoint Evangelist Daijoubu's Avatar
    Join Date
    Oct 2002
    Location
    Canada QC
    Posts
    454
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, you're right but PHP treat them as 2 different things :P
    Speed & scalability in mind...
    If you find my reply helpful, fell free to give me a point

  8. #8
    Employed Again Viflux's Avatar
    Join Date
    May 2003
    Location
    London, On.
    Posts
    1,127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Correct, but I didn't state otherwise, now did I ?


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
  •