0

I moved my code from my local machine to hostgator hosting. Then my php mail() function stop working. My problem is,

1.The function work perfectly with my website email.
2.But it does not work with other mail such as gmail, yahoo mail, etc.

I asked to live chat team, they answered me php mail function will work with all mails on their hostgator. But simply I can't. What the problem is. My question not the duplicate of this (PHP mail form doesn't complete sending e-mail). My mail function work properly in localhost machine. But not work hostgator hosting.

Nyein Chan
  • 1,159
  • 1
  • 12
  • 24

1 Answers1

1

I solved the problem by googling. I inserted fifth parameter of php mail() function with '-fsendermail@mysite.com'. Actually, I don't know why but it really save my day.

Nyein Chan
  • 1,159
  • 1
  • 12
  • 24