using /usr/bin/mail

I have some Perl scripts in which I would like to utilize /usr/bin/mail to send e-mail. I've tried using /usr/bin/mail from the command line to send a test message to my yahoo address, and it fails. I imagine this is pretty basic stuff for a Unix sysadmin, but all I've ever been is a user. What do I need to do to use /usr/bin/mail to send mail?

Thanks,
Brad

MacBook Pro, Mac OS X (10.5.5)

Posted on Mar 31, 2009 12:14 PM

Reply
3 replies

Mar 31, 2009 12:40 PM in response to bearejay

the main thing you need is an open port 25. If it's open, then command line mail should work out of the box with no further preparation. it works on my work computer for example and I can send mail to my yahoo address from it.

However, most internet providers block port 25. I suspect that's the case for you. then you need to set up mail to work with some external smtp server. I've never done it but it should be possible. see these links
http://www.macosxhints.com/article.php?story=20081217161612647
http://www.macosxhints.com/article.php?story=20050911184730802

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

using /usr/bin/mail

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.