windows xp professional. If you want version information you're going to have to tell me how to fetch that.

    Run "cmd" on your machine, and enter the command "netstat -an".

    Search the output for a LISTEN directive that appears on port 25, perhaps like (off the top of my head, no Winbox handy)

    22.33.44.55:25   LISTEN

    If your machine is listening on port 25, most likely you do have a working "Mail Transfer Agent". Like I noted above, Windows doesn't have one built in. If you don't have an MTA, you'll need to either install one on this box or set your SMTP_HOST variable in php.ini to a machine that does have a running MTA ... maybe your upstream provider's mailserver?

      right...if you install linux or unix, they come installed with an internal sendmail server so setting SMTP to localhost indeed work...since you are running wihdows, do as suggested...install an SMTP server on your box or use your ISPs' mail server (if they'll allow you to do so)

        No listening on 25, so I need to install an SMTP server or use an ISP mail server. So if I have outlook setup the ISP mail server would be the incoming server?

        Are there any freeware SMTP servers?

        There's no chance that there is a free server that has this mail capability, is there?

          Originally posted by hwttdz
          No listening on 25, so I need to install an SMTP server or use an ISP mail server. So if I have outlook setup the ISP mail server would be the incoming server?

          Are there any freeware SMTP servers?

          There's no chance that there is a free server that has this mail capability, is there?

          I imagine so. Googling "Windows SMTP Server Freeware" gives me 606,000 results, one of which might actually work.

          The server you want in your Outlook config is the "Outgoing" (SMTP) server.

          Have a good day; I hope we've been of some assistance to ya! 🙂

            Now I have a working SMTP server, I added an email account in outlook with the outgoing mail server set to the server that I have set up on localhost and I can send an e-mail out from that account and recieve it on my other account.

            Now I'm confused again because I'm looking for a MTA but some of the MTA's are both servers and MTA's and I don't know if my server is also an MTA but it's much more user friendly than the sendmail (www.sendmail.org) and I know that it's working, at least partially as demonstrated by the functionality in outlook.

            What is the next step that needs to be taken to try to get the mail() function to work?

            Sorry about asking so many questions but I need to have this working eventually and the documentation is abysmal (for example senmail.org does not make clear what it is, server or mta, and this is not in the faq's, I imagine this is common sense to some people, but unfortunately not all.) Also you all have been very helpful.

            I forgot to say I have postcast server free edition set up.

            My server must include an MTA because I did the previous check netstat.an and I got myipaddress:25 listening
            One thing that's a little unusual is there are a bunch of addresses with all zeros, i.e. 0.0.0.0:80 listening, but the 25 one shows my ip address first. Is this correct?

              Well, sorry for throwing jargon around and confusing you.

              An MTA is a "Mail Transfer Agent", which is the same as saying that it is an SMTP (Simple Mail Transfer Protocol) "server".

              "Server", in this case, means "program that runs on a computer and provides a service" (in this case, SMTP service) rather than "a computer that provides a service or services".

              In other words (MTA==SMTP server) = TRUE.

              A program like Outlook would be called an MUA (Mail User Agent), because it is a client program that handles mail for the user . . . it talks to a POP or IMAP server to receive your email, and it talks to an SMTP server to send email to others, but it doesn't actually do the "over the Internet" transfer of mail from one domain to another....

              The 0.0.0.0 thing is the "ME" address, used when a service is either running on all interfaces, or on an interface upon which that service doesn't know its IP address. I'd say that's pretty normal, depending on how many ports you have open . . . shouldn't be too many unless you're serving everything plus the kitchen sink.

              What do you need to do next? Well, if you're sure that you have mail service up and running, try to get PHP to connect to it by setting SMTP_HOST to its address, etc. Hopefully, it'll return TRUE instead of false when you call mail() now.

              As for your next issue, I wish you luck, but I'm gonna have to beg off, as I'm forumming my time away when I have paying clients that need help. Have a nice day, and good luck!

                Well I finally have it all figured and mail() is sending mail. Thanks a bunch to everyone who helped. If anyone else runs into this feel free to ask me, and I'll give what limited help I can.

                  8 days later

                  I don't know if this thread is closed or not but I've encountered the same mail() problem so I thought i would post it here.

                  Here is my problem, I'm trying to send mail internally inside company (win xp) and I am having trouble with php settings. When I run my script
                  $m=mail('me@hotmail.com',subject,'body','From:test@test.com');

                  no errors were showing and I do get $m = 1 but no mails were ever being sent or rather it never got to my outlook.

                  here is my settings in php.ini:
                  SMTP = localhost
                  smtp_port = 25
                  include_path = .:/usr/lib/php:/usr/local/lib/php
                  sendmail_path = sendmail -t -i

                  I also tried to pin command "netstat -an" and found that I do not have my localhost listening to port 25, this is what i get:
                  0.0.0.0: 25 LISTENING
                  127.0.0.1:1147 LISTENING

                  any help would be appreciated. I'm really running out of ideas.
                  Thanks in advance.

                    The problem here is likely that it's bouncing off of the company's firewall/proxy. I encountered this same problem, try sending it to your work address over the LAN.

                      8 days later

                      Originally posted by hwttdz
                      The problem here is likely that it's bouncing off of the company's firewall/proxy. I encountered this same problem, try sending it to your work address over the LAN.

                      Thanx for your reply. I'm not sure how to send it over then LAN tho.. can you give me more info?

                        For example if I work at a company named BlueBus, my e-mail might be something along the lines of hwttdz@BlueBus.com and it's likely that the company has 1) a proxy, which though I have not researched exactly how it operates is a connection that you connect to that does your bidding in the world wide web outside your Local Area Connection(LAN), I believe this offers additional sercurity. 2) A firewall which prevents questionable traffic from passing through the proxy.

                        I believe the proxy at my location to deliver only mails originating from their e-mail server, so because my server is obviously not the same the mail bounces. For example if I tested by sending it to hwttdz@hotmail.com the mail bounced. However if I send it to othername@BlueBus.com the mail never tries to go out through the proxy and never encounters any problems.

                        For the purposes of testing all that is required of you is to change the destination address to another one on the same LAN. Are you using postcast? Do you have the SMTP set to the name of your server in php.ini?

                          Thank you so much for your reply and your time.
                          After 1+ weeks of trying I've finally got it to work!!
                          You were right about company firewall/proxy, I had to turn them off and use the right SMTP value in php.ini.

                          Thanx a bunch!

                            Write a Reply...