Mail command in Terminal

Discussion in 'OS X Mavericks (10.9)' started by lukestroh, Dec 2, 2013.

  1. lukestroh macrumors newbie

    Joined:
    Nov 25, 2013
    #1
    I used to know a command in Terminal that began with the command "mail (email address to whom one is sending to)"

    this still works, and then comes up with the prompt, "Subject"

    after entering the subject, one can type the body of the email.
    My question is, how does one end this command? I forgot how to end the message and send it. Thanks!
     

    Attached Files:

  2. dean1012 macrumors regular

    Joined:
    Jul 10, 2008
  3. jpeezy macrumors regular

    Joined:
    Feb 24, 2010
  4. cerberusss macrumors 6502a

    cerberusss

    Joined:
    Aug 25, 2013
    Location:
    The Netherlands
    #4
    IIRC, I used to do something like


    $ mail -s "some subject" johnny@example.com < echo "hi there this is the email body"
     
  5. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #5
    According to this article you just type EOF and hit return.
     
  6. ElectricSheep macrumors 6502

    ElectricSheep

    Joined:
    Feb 18, 2004
    Location:
    Wilmington, DE
    #6
    That is only when you use the << shell redirect to specify an explicit EOF token (in that case, "EOF").

    Otherwise, you use ctrl-d to terminate the input and finish the command.
     
  7. HenryAZ macrumors 6502

    HenryAZ

    Joined:
    Jan 9, 2010
    Location:
    South Congress AZ
    #7
    That's how I have always done it
    .
     

Share This Page