email - Why mail() PHP function does not work with WAMP default installation? -
I have the default installation of WAMP Server 2.0.
I am trying to send an email using this simple script:
Alert: Mail () [function.mail]: Failed to join the mail server on the "Localhost" port 25, your "SMTP" and "smtp_port" settings To verify in php.ini or use ini_set () in C: \ My_Path \ send_email.php on line 3 why ?? What could be the reason for this?
I was expecting to be an extremely easy task to send me an e-mail ...: (
You need an outgoing email server (MTA) to be able to send emails. Most Linux systems exist by default on one, and sending mail to send PHP mails, one The Linux app will be used to send a / aka mail whatever MTA you have installed.
In Windows M It is not included by default. In Windows, to be able to send mail from PHP, you should get access to some outgoing email server and tell PHP address and port.It is SMTP
and By using the smtp_port
settings, it is done in php.ini by default on localhost
port 25
.Until you installed the mail server on that machine , It will fail.
If your ISP Paco gives an outgoing mail server, for example, you can use its address and port number. Or, if you are serious about sending mail, then you can add your own local network to your local network or anywhere Can set up the mail server.
Comments
Post a Comment