Unable to mail from command-line - public/pickup: No such file or directory
Sending mail from the command line involves two things.


Open the Apple mail app (/Applications/Mail.app only) and make sure your default account can send mail (or be sure you configured internet accounts preference pane to provide Apple mail credentials for sendmail )
Send the mail without making any command line or Unix changes.


How to send an email from command line?



Step 1 is missing and assumed in the linked question / selected answer. Also, if you don’t want to send mail from an account you enter in your mail app, grab a stand alone install of sendemail as it’s quite easy to set up with your smtp server of choice:


How to send email from OS X command line