PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I said that and you reply, "which host should I use, I am using google"
Either this or you'll need to authenticate with your gmail details, as like I said Google requires authenticated gmail users as the 'mail from' address.
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = smtp.gmail.com
; http://php.net/smtp-port
smtp_port = 587
; For Win32 only.
; http://php.net/sendmail-from
;sendmail_from = xxxxxxxx@gmail.com
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
;sendmail_path = "\"F:\test\xampp\sendmail\sendmail.exe\" -t"
; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =
; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
mail.add_x_header = Off
; Log all mail() calls including the full path of the script, line #, to address and headers
;mail.log = "F:\test\xampp\apache\logs\php_mail.log"
should i use any extra thing to send mail from my localhost. i mean authentication?
Yes i now i understood. I used localhost and still i got that error. So i did "telnel localhost 25" in cmd prompt. it tells "connecting to localhost.....Could not open connection to the host, on port 25: connect failed"
Don't know what is wrong. I already using xampp. All are working fine. I can visit my website by localhost. so it shows my server is working. But it is not working when i use telnet?
shariefbe wrote:Could not open connection to the host, on port 25: connect failed"
This means no program is listening on that port. This is 100% evidence that you do not have a MTA (mail transfer agent) running.
In my experience setting up mail servers on windows is a pain, on linux its much easier. You could try this perl script which will run on windows, it emulates an SMTP server on localhost and just sends the emails to a .txt file on disk. http://www.lastcraft.com/fakemail.php
shariefbe wrote:Could not open connection to the host, on port 25: connect failed"
This means no program is listening on that port. This is 100% evidence that you do not have a MTA (mail transfer agent) running.
In my experience setting up mail servers on windows is a pain, on linux its much easier. You could try this perl script which will run on windows, it emulates an SMTP server on localhost and just sends the emails to a .txt file on disk. http://www.lastcraft.com/fakemail.php
The ISP's mail server probably uses outgoing authentication too. If you want to use authentication like your ISP, or gmail... you'll need something above & beyond the mail() function. Look into phpmailer or swift mailer.
Hi guys. Wonder happens. I got one mail from my localhost. But i dont know in which attempt i got that mail. Because in each and every try I was changing my config file.