2

I've installed the new version of xampp and tried to send a email on my local maschine, but php is returning this to me:

mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()

The thing is, in the previous version I had. Xampp has "send" every email to the xampp/mailoutput folder. My php.ini:

[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP=localhost
; http://php.net/smtp-port
smtp_port=25

; For Win32 only.
; http://php.net/sendmail-from
;sendmail_from = me@example.com

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
;sendmail_path =
muuvmuuv
  • 901
  • 2
  • 13
  • 39

1 Answers1

1

You don't have a mta mail server (or it's running on another port), such as postfix or sendmail installed, therefore you cannot send emails from that server.

Also, even if you install a mail server on localhost your emails won't be received by anyone, because you are most probably on a dynamic IP given by your ISP and you don't have a reverse DNS set for your home IP (meaning straight to spam folder).

Well, if you do have a reverse DNS and a fixed IP at home, then you should know out to setup a mail server, or at very least that you need one in order to send emails.

If you can install sendmail (upgrade xampp) you could use gmail to route your email, just follow instructions from this answer:
http://stackoverflow.com/questions/15965376/how-to-configure-xampp-to-send-mail-from-localhost

Pang
  • 9,564
  • 146
  • 81
  • 122
peixotorms
  • 1,246
  • 1
  • 10
  • 21
  • 1
    Yeah that would the way if I want to send emails out. But I want to store them in a folder, like in a previous version of xampp. So the email should only saved as a file not really send via a server – muuvmuuv Feb 17 '16 at 15:52
  • Please upgrade to xampp v5.6.15 https://www.apachefriends.org/index.html and try again – peixotorms Feb 17 '16 at 17:45