AppleScript to TEXT me when certain emails come in

Currently, I have a Mail Rule that forwards certain emails to me, via text.
It comes over unformatted for text, very ugly and hard to read.
I would like an AppleScript to send me a text that only has FROM and SUBJECT. Once I see that, I can get the rest form my iPhone. I just don't want to miss these emails.
Has anyone already written this script?

Thanks for the pointer!
So I got this to work in the AppleScript Editor:
tell application "Mail"
          set newMsg to make new outgoing message
          set content of newMsg to "Test Message from Mail2text.scpt"
          set sender of newMsg to "someone"
          set subject of newMsg to "Test"
          tell newMsg
  make new to recipient at end of to recipients with properties {address:"[email protected]"}
  send
          end tell
  --set visible of newMsg to true
  --display dialog theContent
  --say theContent
end tell
but I cannot get it to work via a rule:
using terms from application "Mail"
          on perform mail action with messages theSelectedMessages for rule theRule
                    tell application "Mail"
                              repeat with eachMessage in theSelectedMessages
                                        tell eachMessage
                                                  set f to sender of eachMessage
                                                  set s to subject of eachMessage
                                                  set ds to date sent of eachMessage
                                                  set dr to date received of eachMessage
  --say theContent
  --display dialog theContent
                                                  set newMsg to make new outgoing message
                                                  set sender of newMsg to f
                                                  set subject of newMsg to s
                                                  set content of newMsg to "Message from" & sender & " sent:" & date sent & ", received:" & date received
                                                  tell newMsg
  make new to recipient at end of to recipients with properties {address:"[email protected]"}
                                                            send
                                                  end tell
  --set visible of newMsg to true
  --display dialog theContent
  --say theContent
                                        end tell
                              end repeat
                    end tell
          end perform mail action with messages
end using terms from

Similar Messages

  • How to get notify when new Email comes in...

    hi, any idea on how to get notify from phone when there is new email comes in to mailbox with specific key words in the subject, says like "urgent" ..... what are the components that i need to integrate with??
    messaging version 6.2

    Hi,
    Off the top of my head there are two ways:
    1. Use the ENS service to notify when messages arrive - filter out the ones you want. This is going to require some programming and a way to send the notification to the phone.
    http://docs.sun.com/app/docs/doc/819-2655
    2. Use a user-level sieve filter to send a copy of the messages you want to another email address which triggers an SMS.
    http://docs.sun.com/app/docs/doc/819-2650
    Regards,
    Shane.

  • Sent text message to my email comes back as text message

    I need to be able to print out a text thread.
    So I edit and spend 3 hours individually selecting each thread, (have to keep starting over because any miss-tap results in all the selections being lost), then forward the thread to my email address, (which happens to be the email address associated with my iTunes account, [what a bizzare concept]), and it quickly lands back in my text messages from myslef.
    help please

    I would do that in one of two ways:
    1.  Select the text message, copy it, and paste it to an email message to yourself.
    2.  Take a screen shot of the text message (which you can do by holding the home and on/off buttons together for a brief instant.  Then send the resulting screen shot from the camera roll to yourself via email.

  • Not being alerted when Incoming Emails comes in.

    When I first purchased my 3G iPhone, I was notified of any incoming emails (vibrate and a tone). For the past two weeks, I have not been notified of incoming emails. I even went to the Genius Bar in Newport Beach, CA and waited 4 hours and no one was able to help me. The blamed it on my Yahoo account, which we know is not the case.
    Does anyone know how to fix this issue...I need to be notified of every incoming email.
    Thanks

    Same problem here - this is a SERIOUS issue

  • Apple Mail *sometimes* not "ringing" when new emails come in

    The subject says it all... Why and how could this happen?

    I don't know what to recommend. With my MobileMe, accessed in Mail 3.x or 4.x, the new message alert has consistently been silent, but since the feature in not in Mail 2.x, it is not that way on my old G4 running Tiger. With IDLE, in Mail 4.3 for example, the new message indicator in the Dock indexes immediately upon getting a message, whether the other accounts are being checked on the 5 min schedule or not, so Push is working as it is supposed to. I did not find that my Gmail account did that, even when I had IDLE selected, and the alerted sound -- but only when all the accounts are being checked. Reminds me to test that again.
    My high use account is not my MobileMe, so hard to judge whether it ever gives the alert sound when the cycle to check for new messages coincides with the arrival of a new message in the Inbox.
    My hosted domain IMAP account permit selecting, but they never seem to actually push email.
    Ernie

  • Custom alert when certain emails arrive

    Can I set up a way to give me a distinct "ringtone" for an email address?

    No this option is not there in BlackBerry. But you can set dofferent alert for your different mail IDs.
    tanzim                                                                                  
    If your query is resolved then please click on “Accept as Solution”
    Click on the LIKE on the bottom right if the post deserves credit

  • How to get bell to ring when email comes in

    How can you make the bell ring when an email comes in.?

    Make sure you have an Alert sound selected for the Mail account in the Notification center:
    Settings > Notification Center > Mail > select account (if more than one) > Alert Sound

  • How to set a sound when a email will print from the printer.

    I would like to set a sound or a big bip when a email come throught the printer via hpeprint

    You can send the values in query string and access them from
    your flex application. Below is the URL to the page describing how
    to access query string parameters in Flex application
    http://livedocs.adobe.com/labs/flex3/html/deep_linking_5.html#245869
    Hope this helps.

  • A friend of mine sent me a voice memo via text message, it shows and plays in my iPhone as a quicktime voice clip:  So how do i import the clip to my iMac?????? When I sync my iPhone it does not show as a voice memo, I tried emailing it but the email come

    A friend of mine sent me a voice memo via text message, it shows and plays in my iPhone as a quicktime voice clip:  So how do i import the clip to my iMac?????? When I sync my iPhone it does not show as a voice memo, I tried emailing it but the email comes through empty. Please help.

    Copy that voice memo, create a new email and paste it and send it to yourself! You can save it to your computer now and send it to someone else

  • I would like to send a text message to a cell phone when certain alarms occur.

    I would like to send a text message to a cell phone when certain alarms occur.
    I have read some of the other post which don't give a straight forward answer on how to accomplish this task.  Also the newest post on this topic is from 2005.  I'm sure things have changed since then.
    Please help me with a step by step solution.
    Thanks for your help!

    You may use U.C.ME-OPC to send text messages to any cell phone. You may use a cellular modem that is connects to a serial COM port. In addition you may send an email that will be received as an SMS or eamil. If you use a cellular modem you may also send commands (for example: change or query values) from your cell phone to Lookout through U.C.ME-OPC.
    U.C.ME-OPC connects to Lookout using OPC or DDE.  
    To learn more visit Control-See web site at www.controlsee.com .

  • TS2771 my text tone is not working on my ipod when certain people text

    The text tone works only when certain people text my son's iPod Touch. When I text him from my iPhone5, the badge shows up, but no alert.

    Follow basic troubleshooting found in your user Guide for your phone.
    http://manuals.info.apple.com/en_US/iphone_user_guide.pdf
    #1: Reset: http://support.apple.com/kb/HT1430
    #2: Restore: http://support.apple.com/kb/HT1414

  • Variable text is blank in emails when using Scheduled Task to email event log notifications

    I am trying to use powershell to email notification when a user account gets locked.  I am running the script from a server 2008 domain controller.
    I have tried multiple scripts and I have the same issue every time.  The script works fine when I run it directly from the powershell command line window.
    However whenever I try running the exact same scripts from an event-triggered scheduled task, the script runs, however any content that generated from a variable is not added to the email.  It is just left blank and ignored.
    I have tried adding lots of permissions including domain administrator group membership to the account  runs the task from and it doesn't include all the expected text unless I run it from the built-in domain administrator account.
    The task runs and the email is sent, but the email is missing all the content generated by variables.
    How can this be fixed?
    Here is an example script.
    $AccountLockOutEvent = Get-EventLog -LogName "Security" -InstanceID 4740 -Newest 1
    $LockedAccount = $($AccountLockOutEvent.ReplacementStrings[0])
    $AccountLockOutEventTime = $AccountLockOutEvent.TimeGenerated
    $AccountLockOutEventMessage = $AccountLockOutEvent.Message
    $messageParameters = @{ 
    Subject = "Account Locked Out: $LockedAccount" 
    Body = "Account $LockedAccount was locked out on $AccountLockOutEventTime.`n`nEvent Details:`n`n$AccountLockOutEventMessage"
    From = "[email protected]
    To = "[email protected]
    SmtpServer = "exch2010.domain.local" 
    Send-MailMessage @messageParameters
    =================================================
    Here is an example of task settings.
    <?xml version="1.0" encoding="UTF-16"?>
    <Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
      <RegistrationInfo>
        <Date>2015-03-25T21:40:28.8095226</Date>
        <Author>DOMAIN\administrator</Author>
      </RegistrationInfo>
      <Triggers>
        <EventTrigger>
          <Enabled>true</Enabled>
          <Subscription>&lt;QueryList&gt;&lt;Query Id="0" Path="Security"&gt;&lt;Select Path="Security"&gt;*[System[Provider[@Name='Microsoft-Windows-Security-Auditing'] and EventID=4740]]&lt;/Select&gt;&lt;/Query&gt;&lt;/QueryList&gt;</Subscription>
        </EventTrigger>
      </Triggers>
      <Principals>
        <Principal id="Author">
          <UserId>DOMAIN\WilliamsD</UserId>
          <LogonType>Password</LogonType>
          <RunLevel>LeastPrivilege</RunLevel>
        </Principal>
      </Principals>
      <Settings>
        <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
        <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
        <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
        <AllowHardTerminate>true</AllowHardTerminate>
        <StartWhenAvailable>false</StartWhenAvailable>
        <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
        <IdleSettings>
          <StopOnIdleEnd>true</StopOnIdleEnd>
          <RestartOnIdle>false</RestartOnIdle>
        </IdleSettings>
        <AllowStartOnDemand>true</AllowStartOnDemand>
        <Enabled>true</Enabled>
        <Hidden>false</Hidden>
        <RunOnlyIfIdle>false</RunOnlyIfIdle>
        <WakeToRun>false</WakeToRun>
        <ExecutionTimeLimit>P3D</ExecutionTimeLimit>
        <Priority>7</Priority>
      </Settings>
      <Actions Context="Author">
        <Exec>
          <Command>powershell.exe</Command>
          <Arguments>-nologo -File "C:\powershell\l2.ps1"</Arguments>
        </Exec>
      </Actions>
    </Task>

    By variable text I mean everything that it generates by using a variable such as the user's name ($LockedAccount)
    and everything else such as $AccountLockOutEventTime and everything else that is generated from
    a variable.
    Nothing like that appears in the email only hard coded text.
    I am not running it remotely.  I am logged directly onto the domain controller and I tried giving
    the account that is used to run the task more and more permissions including domain administrator group membership with the same result.
    When I run the exact same script on the same domain controller locally via the powershell CLI all of the info appears.
    This is the info when the email is generated by running the script directly from the powershell CLI:
    ================================================
    ================================================
    Account BondJ was locked out on 03/26/2015 20:42:18.
    Event Details:
    A user account was locked out.
    Subject:
                    Security ID:                         S-1-5-18
                    Account Name:                 DC1$
                    Account Domain:                            
    DOMAIN
                    Logon ID:                            
    0x3e7
    Account That Was Locked Out:
                    Security ID:                         S-1-5-21-3440879815-2193117124-1719501250-1154
                    Account Name:                 BondJ
    Additional Information:
                    Caller Computer Name:                DC1
    ===================================================
    ====================================================
    Below is the contents of the email when the same script runs via scheduled task trigger using any account I try other than the built-in domain Administrator account.
    =======================================================
    ======================================================
    Account  was locked out on .
    Event Details:
    ===================================================
    Just mostly blank email body with the info above.  All the important information text is missing from the email.

  • When alot of my emails come through to my iPad there is a message "This message is only partially downloaded, there is then a box to touch that says download remaining --kb

    When alot of my emails come through to my iPad there is a message "This message is only partially downloaded, there is then a box to touch that says download remaining --kb

    That's normal. The iPad Mail only completely downloads emails which are less than a certain size. Presumably the idea is to conserve network resources.

  • Solution to hanging mail when responding to certain emails

    I've had this annoying problem for a couple of months where I would get the spinning wheel of death when I would try and respond to certain emails. I've read multiple posts and suggestions and tried almost all of them to no avail. I finally read a tech note describing problems that some programs may have when a particular font is corrupted. So, this is what I did and it solved the problem:
    1. I opened the font book application (in your applications folder) and examined each and every font for signs of corruption. They all looked perfect. But I did notice that some font styles (bold, italics, etc...) were duplicated. The ones that have duplications appear with a small dot next to them.
    2. I opened each font with a dot next to it (click on the little arrow on the left of the font) and disabled one of each duplicated font style (typically the one that did not have a dot next to it).
    3. restarted mail (after having to force quit it) and I was able to reply to the problem emails.
    Hope this is useful to some other's out there who've been experiencing the same problem.
    Cheers y'all,
    ramo

    Cltrl/Alt/Delete for Task Manager, look under processes tab for firefox.exe, highlight and hit delete key. Then search for other instances of firefox.exe and delete them too. Close Task Manager and click on your Firefox icon and it should come up. This happens to my wife when she is frustrated and just closes Firefox outright and then immediately tries to reopen it. The Task Manager has not had time to close out firefox.exe

  • High CPU usage when selecting certain emails

    I experience (above) 100% CPU usage in Mail.app when selecting certain emails. Mostly emails from the same sender.
    The emails contain MIME multipart data. One part is BASE64 encoded text, the other is quoted-printable encoded HTML.
    I can see in the process trace that two threads seem to be thrashing around in MFRedundantTextIdentifier.
    CPU usage goes up. I can still use the application (it is not blocked). But it cannot be quit normally (only with force quit).
    Apple engineers: this must be something that you would wish to find and fix?
    Any help with diagnosing would be greatly appreciated!
    Sincerely.
    -dennis

    Maybe my initial post was not clear so let me add some clarifications.
    I have the problem with Aero disabled
    I have the problem on the Apple site which does not have any flash content.
    I have already hacked the lastest nvidia drivers to get them on my system which did not change anything. Can you provide a link to some other 'supported' beta drivers?
    I am using the new 13 inch air so it has the newer graphics card so I would expect it to be faster than an old HTPC with a 9400m in it. I wasn't stating that my Air had a 9400m.
    It would be great if someone you also do the test to check the cpu load:
    - when playing a 720 mkv
    - when dragging a window across the screen
    Just open task manager and see if the CPU spikes.
    Many thanks!

Maybe you are looking for

  • How to move music from an apple id to a new appe id

    How do I move my daughters music from my apple id as she is now old enough to have her own apple Id???? Thanks

  • How to view the source code for Native Method

    hi i am using some native methods in to my code ; can anybody tell me how to view the source code for the same ; nik

  • Start up problem-can't get past Apple grey screen and spinning gear

    Upon trying to start up my laptop, got nothing but the apple logo, grey screen and spinning gear. I tried several things to resolve the problem on my own (hardware test said it could not verify the disk/could not start up from the OS X install disk/r

  • Ghosting when playing DVDs

    Hi, using RX2600XT diamond and connecting to my LCD TV via vga. When I play some DVDs, especially dark scenes and fast movement, I see trails and ghosting. I see the previous scene for about few seconds on the screen and if there is arm movenet, you

  • Customer-Vendor Document Clearing - Issue

    HI, Vendor, SOMA, agreed to pay the installation charges of $37.89 on Customer # 15282 invoice # 15016788. SOMA allowed us to short pay an invoice to them in settlement of the invoice amount they owe to us. Is there a way to clear the $37.89 short pa