Mail applescript?

Discussion in 'Mac Programming' started by lynkynpark86, Apr 9, 2011.

  1. macrumors 6502

    #1
    I'm trying to make a script that gets the newest message in Mail, and sets the message's body to a variable. Something like:
    Code:
    tell application "Mail"
         set messageBodyVariable to (body of (newest message))
    end tell
    
    Any ideas?
     
  2. macrumors member

    ccamelot

    Joined:
    Feb 21, 2010
    Location:
    Swinoujscie, Poland
    #2
    Yeah, I have an idea...

    Try this one:

    Code:
    tell application "Mail"
    	set latestMessage to content of first message of inbox
    end tell
    best
    Les
     

Share This Page