Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I've had my first Mac for about five months now. Though, even when I was a full-on Windows user, I never did things through a command line; I was pretty much for the GUI all-the-way..

But now that I have my Mac, I'm interested in learning a little about the Terminal and the commands used in it. So far I've learned how to do minor things, like moving, renaming, and deleting files, ect. But now I want to go for something different, like the mail command.

So tonight I figured out how to send mail to myself through the 'mail' command. But now I'm curious and asking if there's a way to send e-mail to people using say, Yahoo or Hotmail.

Sorry if this is a basic question, but I'm new and curious. Thanks.

share|improve this question
3  
Technically, GUI-all-the-way is also the Mac way. What you are learning is the Unix way. –  Fake Name Oct 2 '11 at 11:38
    
man mail. 'nuff said. –  Kudu Oct 2 '11 at 19:23
add comment

1 Answer

It you want to send an email to a given address put it as an argument to the mail command:

mail -s "Some subject" toaddress@example.com

see man mail for other options

Any text you type after issuing the command you can enter the text for your mail directly in the terminal. To end mail text entry, enter a new line with a single ..

Do note that this just queues the mail for sending as if your mac were a functioning mail server. Local delivery to local accounts is easy to set up, to set up a working mail server that connects to the internet requires some more advanced set up as well as a relationship with someone else that operates a mail relay. This isn't a client that works directly with mail services like gmail / yahoo / hotmail or iCloud (MobileMe).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.