如何在没有smtp /邮件服务器的VPS上通过PHP发送电子邮件?

I'm moving a few sites from a full managed cPanel VPS to a cheaper VPS that basically has nothing (runs ubuntu 12.04).

The PHP scripts that I have send email via the mail() function.

I'd rather avoid installing any mail server stuff onto the VPS. I'm open to paid mail services or other methods. I'm not even sure what this would be called so finding it hard to find solutions.

You can use PHPMailer or SwiftMailer to send emails using an authenticated SMTP server, like Gmail.

You can use free smtp email sending classes such as phpmailer to send emails from your server using some other smtp providers.

Mandril is one of the best cheap SMTP providers available in the net. They allow 12000 emails per month for free.