Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 795457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:29:01+00:00 2026-05-14T22:29:01+00:00

I have Mail set up to execute an AppleScript when it receives an email

  • 0

I have Mail set up to execute an AppleScript when it receives an email with the subject “AppleScript” and I was wondering how I could pass the body of this email to the script for execution.

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T22:29:02+00:00Added an answer on May 14, 2026 at 10:29 pm

    The body of a message can determined my using the content property of the message that has been passed to the rule action. To execute the script use the run script command.

    The following script is an example of how to write an AppleScript that can be attached as a rule action that will run the body of the message as an AppleScript:

    using terms from application "Mail"
        on perform mail action with messages theMessages for rule theRule
            tell application "Mail"
                repeat with theMessage in theMessages
                    set theBody to content of theMessage as text
                    my executeScript(theBody)
                end repeat
            end tell
        end perform mail action with messages
    end using terms from
    
    on executeScript(theScript)
        display alert "Run the following AppleScript?" message theScript buttons {"Cancel", "Run"}
        if button returned of result = "Run" then
            run script theScript
        end if
    end executeScript
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this mail script I have to run a few times. To start
I have set up a mail merged XtraReport, and it works fine. Now I
I have a php mail script sitting on a LAMP vps server. The script
I have a mail function $to = fahad@somewhere.com; $subject = Voucher Number: .$voucher; $message
For SharePoint, I want to have custom E-Mail body for workflow tasks. However i
Having big problems trying to get my php script to send email. Using this
I have created a mail.jar file and mywar.war file. What I need to set
In the configuration properties of my javax.mail.Session I have set mail.debug=true , but for
That's really the whole question. I have some mail interceptors but when I set
I have a mail() function going in a PHP script. It sends HTML just

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.