PHP mail() function not working – [Solution]

Home Forums PHP PHP mail() function not working – [Solution]

  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
Viewing 0 reply threads
  • Author
    Posts
    • #264
      admin
      Keymaster

      PHP mail() function not working is a common issue. A better solution is using the SMTP library. phpmailer is good SMTP mail library.

       

      For testing purpose just create a file and add the following code.

       

      Most of the shared web server is blocking mail() function to reduce spam emails. You can see commonly mail() function emails are going to spam or junk folder.

      Mail function Details:-

      mail ( string $to , string $subject , string $message [, mixed $additional_headers  )

      It will return boolean (true or false)

      How to configure SMTP library ?

      Install phpmailer library using composer.  First install composer, if you not installed in your system.

      Just post your doubts here.

Viewing 0 reply threads
  • You must be logged in to reply to this topic.