I'm unfamiliar with Linux, but I'm trying to send mail from PHP. Via SSH, I've found my server's sendmail and mail functions to be incapable of sending mail through SMTP. But, I've had success with nc (Netcat) and telnet. Is there a way to switch a server's default mail sending application? E.g. from sendmail or mail to nc or telnet?

Have you tried a PHP library for sending mail, like PHPMailer or Swift Mailer, and send mail via SMTP and not via the mail() function?

Also, using those libraries you will be able to send more powerful mails (html, attachments) a lot more easily.

And also, and this is what you were looking for (I think), you may take a look to sendmail_path configuration option of php to specify your mail sending application command line (seems you can put some parameters to your command).