Send Email Using Applescript or Terminal

Discussion in 'macOS' started by rebello95, Oct 21, 2011.

  1. rebello95 macrumors member

    Joined:
    Jun 15, 2011
    Location:
    USA
    #1
    Okay here's what I'm trying to do:

    Send an email with AppleScript (or Terminal) without installing anything on my computer. The hard part is that I don't want it to be visible and I want something copied from the clipboard to be pasted into the body of the text.

    Please help!
     
  2. r0k macrumors 68040

    r0k

    Joined:
    Mar 3, 2008
    Location:
    Detroit
    #2
    What do you mean you don't want it to be visible?

    What do you mean "without installing anything?" If you create an Applescript app and drag it to Applications, you've just installed something.

    I found a post over on mac os hints about sending mail from terminal. Before you go editing postfix configurations, keep in mind the post is from 2008 so things might have changed since then.
     
  3. HenryAZ macrumors 6502

    HenryAZ

    Joined:
    Jan 9, 2010
    Location:
    South Congress AZ
    #3
    Terminal:
    You might want to read the man pages for pbpaste (paste from clipboard) and mail (command line mail utility) for further information. To answer your question simply, you would create a text file from the clipboard using pbpaste, then send it using mail.

    $ pbpaste > mailmsg
    $ mail yourrecipient@wherever.com < mailmsg
     

Share This Page