PHP mail() function not working – [Solution]

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

  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

This topic contains 0 replies, has 1 voice, and was last updated by  admin 2 months, 1 week ago.

  • 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.

You must be logged in to reply to this topic.