SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Enthusiast mildfoam's Avatar
    Join Date
    May 2010
    Location
    Australia.
    Posts
    56
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Exclamation Connect time out, when I did send email from xampp (localhost)

    hi all,


    I just learning about send many email over localhost (xampp) and I use PHP for programming language, Okay now i've finished to configured all apache, php.ini and mercury server but when I am trying to send an email over this script :

    PHP Code:
    <?php

        $subject
    ="Test mail";
        
    $to="xxx@gmail.com";
        
    $body="This is a test mail";
        
    $from="xxx@gmail.com";
        
        if (
    mail($to,$subject,$body'from: xxx@gmail.com'))
            echo 
    "Mail sent successfully!";
        else
            echo
    "Mail not sent!";
    ?>
    I just got notice that my message was successful to sent. but when i check out my gmail I'm not see new email in here. Okay i now open the error.log in xampp then i notice about something wrong in here :

    sendmail: Error during delivery: Connect timed out.
    so, what should I do now ?
    Object Oriented Programming Fans Boy ?

  2. #2
    Twitter: @TimIgoe silver trophy TimIgoe's Avatar
    Join Date
    Feb 2005
    Location
    Blackpool, UK
    Posts
    1,056
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    Do you have a mail server running on your box? Is it definitely working?

    Equally, if this is a home / test server.. can that server send out mail correctly? Some providers block / filter outbound SMTP requests.


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
  •