By homyo9
Hi, I’m new to server management. I’ve installed LAMP stack and setup Wordpress on main domain and a PHP script on sub domain… After it I want SendGrid SMTP to be used by Wordpress web and by script, I do it on Wordpress by WP Mail SMTP plugin and setup SendGrid API in it and click save when I go to check this out, I go to wordpress login page then forgot password and type my email in it and hit enter but it gives me error PHP mail() function is disabled on my server! After it I open WP Mail SMTP and change the settings from SendGrid to None (System Defaults) and click save, now i again go to check this by going to forgot password entered my email and press enter, Email send successfully! On my email I’ve received password reset email by root@localhost, Same error with other PHP script on which in script SMTP settings i put all SendGrid SMTP values and click save but it gives me “Connection Failed” error! Please help me :')
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!
You may need to install the sendmail or postfix package on your droplet in order for the PHP mail() function to be able to attempt to send via SMTP.
sudo apt-get update;
sudo apt-get install postfix;
This comment has been deleted
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.