1

I want to send email through contact form from a website. And I have given link to php file in which senders mail is there and I'm using mail() function by passing arguments when I hits submit button the following error is displaying like this.

Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in E:\xampp\htdocs\hotel-booking\contact_process.php on line 52

Why?

mplungjan
  • 169,008
  • 28
  • 173
  • 236
user3669026
  • 141
  • 1
  • 6

1 Answers1

1

Firstly, if u using localhost to send email, you must edit your SMTP configuration in php.ini file.

SMTP = localhost
smtp_port = 25

Then u must open SMTP service in your server.

ferry
  • 64
  • 4