I am trying to determine if php mail is enabled on my server. I an using Ubuntu 20.4 with LAMP setup and running.
How do I determine which php version I am using? How do I find out if php-mail and or sendmail are installed and/or enabled? If not installed or enabled, how do I accomplish that?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
To check what PHP version you are using you can use the following command:
Regarding the PHP mail, what I would recommend is using an SMTP service instead. For example, you can use Sendgrid, they offer a free SMTP account and it is sufficient for most cases.
This will drastically improve the deliverability rate of your emails.
Then you can use this together with PHPMailer:
For more information on why you might not want to run your own mail server I would recommend this post here:
Hope that this helps!