Generate and Send New Message on Receipt of Email in Mail.app

Discussion in 'Mac Programming' started by Zyniker, Feb 17, 2010.

  1. Zyniker macrumors 6502

    Joined:
    Feb 14, 2008
    #1
    So, I have a request that will (likely) involve an AppleScript.

    Essentially, what I want to accomplish is this:

    If I receive an email with an email address in the subject line (let's use address@email.com), I want Mail to generate a new email to the address from the subject line and then send it with a pre-defined body text.

    If anyone knows how to accomplish this, the help would be much appreciated.
     
  2. miles01110 macrumors Core

    miles01110

    Joined:
    Jul 24, 2006
    Location:
    The Ivory Tower (I'm not coming down)
    #2
    You can do this with Mail Rules. I would explain the process, but it's pretty simple and you might find something else there you might be interested in at the same time. Mail -> Preferences -> Rules
     
  3. Zyniker thread starter macrumors 6502

    Joined:
    Feb 14, 2008
    #3
    I don't believe I can do this with the Rules in Mail. Perhaps you were under the impression that I meant if I receive an email with one, specific email address as the subject I'd like to respond to it; however, this is not the case.

    I would like to take ANY email address in the subject line of an email sent to a particular account and automatically send an email (with some pre-determined body text) to the email address that was contained in the subject line of the received email.
     
  4. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #4
    It's (AFAIK) doable with Mail rules but yes you'll have to use AppleScript to parse out the email address from the subject and generate the new email. See this thread for a template to get started.

    (I moved this thread to Mac Programming)
     
  5. miles01110 macrumors Core

    miles01110

    Joined:
    Jul 24, 2006
    Location:
    The Ivory Tower (I'm not coming down)

Share This Page