A lot of VPS’s do not have mail functionality right out of the box, so if you install a stack like LAMP or maybe a WordPress install script (like you find on Linode or Digital Ocean) , and then try to send mail via your website, you will most likely get an error.
For example if your using Contact Form 7 in WordPress you will get “Failed to send your message”, not a very meaningful error. So the first step is to troubleshoot the problem, login via SSH and type:
This should show your servers open ports, there should be a mail program in there with a mail port open to 25 and/or port 465 (or 587) for SSL. If not then you will not be able to send any mail via PHP, unless you have configured a different port or remote service, all of which can be verified.
You can further test PHP’s mail by sending a test email using PHP’s command line or putting the following into a PHP file.
mail ( 'firstname.lastname@example.org', "Test mail", "Test mail from your server name" );
I originally wrote this article in a positive light but after a year plus I have an update..
Avoid Digital Ocean at all costs, they are shit.
Digital Ocean Problems:
- Horrible, horrible customer service. Look elsewhere if you want rock solid support. DO just copy pastes boilerplate responses and are generally incapable of doing anything.
- Get ready for lots of downtime. Unless you can fine tune a DB get ready for constant downtime and reboots with little to no reason.
- Late payment on your account? They email you and after 3 weeks delete everything including your backups and images.
Digital ocean is a garbage service, you know what they say you get what you pay for. Aviod them at all costs you will thank me later.
********** Original article below **********
So I recently went through shared hosting hell with a host that start with a color and ends in “host”, it’s not redhost or yellowhost, can you guess which crappy host it is?
I’m big fan of Linode but did I really need an unmanaged VPS for a few small scale sites at that price? These sites are tiny, netting under 5k a month (traffic) and not doing much under the hood.
Enter Digital Ocean , yes that is a referral link that nets me a whopping 10 bucks, anyhow this is why I choose them.