PHP mail function()

 PHP mail function

PHP mail function is a very good function in PHP language for sending mail from the server. There are the different libraries and packages which are used to send the mail from the server like PHP Mailer (library), PHP Pearl (package) but its difficult to make a connection that's mean to check the PHP mail function is work properly or not, it send the mail to correct the email address or not. Basically, most programmers said PHP is the not the best programming language but javascript is ahead of PHP in the server language, why I said this because recently I have done some research and I find that Javascript is ahead of the PHP but this is not matter. It is very difficult to find the error on the live server because I give an error like
It is very irritating to know what error has occurred but by using the server log it will be easy for the programmer to find the error because the server log shows the error 
so this will be easy for the programmer to find the error with the server log.

Now let's talk about the different method for using PHP mail function.
There are different methods of sending mail from the server using PHP function
1. Using the PHP mailer for sending the mail
2. Using the Pear mail for sending the mail 
Both are different as I discuss above.

For sending the mail from the server in PHP you have checked the PHP mail function is available in your server without this you can't send the mail from the server. So, at last, you have to choose which method is very easy for you.