Loading ...
Sorry, an error occurred while loading the content.

Script: Read new mail instantly on phone

Expand Messages
  • oidipa_maas
    Dear Clickers, here s a little script/trick to get new e-mail instantly displayed on your phone from any menu with just one click, as well as announced on the
    Message 1 of 7 , May 29, 2003
    • 0 Attachment
      Dear Clickers,

      here's a little script/trick to get new e-mail instantly displayed on
      your phone from any menu with just one click, as well as announced on
      the screen of your Mac.

      NOTA BENE: Using the script as described below is probably not
      recommended, and could possibly mess things up. It has been
      thoroughly tested for a week, though, and so far hasn't caused any conflicts or other
      problems. For me, that is.

      Here's how it works:
      Whenever you receive a new mail it will be announced on the screen of
      your Mac, saying either "Reply from X", "Forwarded mail from X" or
      "New mail from X". (Hence you don't have to open Mail to see what the fuzz is
      all about.)

      If you are away from your computer, just press "No" on the phone when
      you hear the Mail alert and a message will pop up and tell you all
      about it (sender, subject, and even mail content). If you've received more
      than one mail, the pop up message will tell you how many and display the most
      recent one. (You can of course press any key you like, but other keys than "No" will
      result in a Clicker action. For example if you are using the iTunes Controller, clicking
      "Yes" will pause iTunes while you are reading your mail.) If the mail is in HTML format
      (graphical) Salling Clicker will not be able to display it, and tell you so.

      Since pop up messages are limited to 160 characters you might not get
      to read the whole mail, but you will at least get an idea of if it's
      worth leaving your sofa for. If you want to be able to read the whole mail,
      see the hint on how to disable the 160 character limit posted somewhere in this
      forum. I haven't tried this yet, so I'm not sure if it works.

      So, no need to anxiously use any of the Check For New Mail-scripts
      anymore (and, if lucky, consult your computer to actually read them).
      Perhaps the best part is that you can now remove the Check For New Mail script
      and make room for something more useful in the main menu, since this script is not
      to be used with Salling Clicker, but with Mail.

      Here's how to do it (if you haven't guessed already):
      Copy the script below and paste it into Script Editor. Save the
      script. Open Mail. In Preferences, choose Rules and Add Rule. Set
      the first condition to Any and the second to Every Message and choose Run
      Applescript as the perform action. Choose the script you just saved, and make sure
      the rule is the first one in the list of rules. Otherwise it will not work. That's it.

      The script is based on the various Speak Mail scripts found on Macosxhints.com. Not
      sure who to give credit.

      Enjoy,
      Oidipa


      on perform_mail_action(info)
      try
      tell application "Mail"
      set unreadMail to 0
      set everyMail to |SelectedMessages| of info
      repeat with eachMail in everyMail
      set unreadMail to (unreadMail + 1)
      set fromAddress to sender of eachMail
      set breakAddress to " <"
      set nameEnd to the offset of breakAddress in fromAddress
      if nameEnd is not 0 then
      set FromName to (characters 1 through nameEnd of fromAddress) as string
      end if
      set mailSubject to subject of eachMail
      set mailContent to content of eachMail
      if mailSubject contains "Re:" or mailSubject contains "re:" then
      set screenMsg to "Reply from " & FromName
      else if mailSubject contains "Fwd:" or mailSubject contains "fwd:" then
      set screenMsg to "Forwarded mail from " & FromName
      else
      set screenMsg to "New mail from " & FromName
      end if
      tell application "SEC Helper"
      show screen message screenMsg
      end tell
      delay 2
      end repeat
      if unreadMail is 1 then
      set popupMsg to "New mail from " & FromName & "- " & mailSubject & ": " &
      mailContent
      else if unreadMail is not 1 then
      set popupMsg to unreadMail & " new mails. Most recent from " & FromName & "- " &
      mailSubject & ":" & mailContent as string
      end if
      tell application "SEC Helper"
      enter popup mode text popupMsg
      end tell
      end tell
      on error
      tell application "SEC Helper"
      enter popup mode text "Sorry! Can't display new mail."
      end tell
      end try
      end perform_mail_action
    • kaneda_tatsaki
      Hi Thnx for this great script it works just perfect :-)I added these lines and now my Mac tells me how many new Mails I have got.-----------------Added
      Message 2 of 7 , May 30, 2003
      • 0 Attachment
        Hi
        Thnx for this great script it works just perfect :-)

        I added these lines and now my Mac tells me how many new Mails I have got.


        -----------------Added there----------------

        if unreadMail is 1 then
        tell application "Finder"
        set txt to "There is " & unreadMail & " new Mail"
        say txt
        end tell
        set popupMsg to "New mail from " & FromName & "- " & mailSubject & ": "=
        &
        mailContent

        else if unreadMail is not 1 then
        tell application "Finder"
        set txt to "There are " & unreadMail & " new Mails"
        say txt
        end tell
        set popupMsg to unreadMail & " new mails. Most recent from " & FromName=

        & "- " & mailSubject & ":" & mailContent as string
        end if
        ---------------------------------------
        It´s great if you set up getting Mail let´s say every 5 minits or so.
        But to be able to look for new Mails whenever you like I wrote this little =
        script
        for Clicker.

        --------------Check Mail----------
        try
        tell application "Mail"
        check for new mail
        end tell
        end try
        try
        tell application "SEC Helper"
        enter popup mode text "Searching for new Mails"
        end tell
        end try

        ----------------------------------------

        Btw I have some problems getting Mails via DHCP.
        My Mac is DHCP client of my PeeCee DHCP Server and everything works
        great so far but getting Mails is a problem. Mail recognizes that there are=
        new
        Mails but doesn´t download them from server. It woun´t download no matter i=
        f
        firewall is active or not so can nebody help and tell me what to set up to =
        be
        able to get Mails over DHCP please.











        --- In ericssonclient@yahoogroups.com, "oidipa_maas" <kastner@t...> wrote:
        > Dear Clickers,
        >
        > here's a little script/trick to get new e-mail instantly displayed on
        > your phone from any menu with just one click, as well as announced on
        > the screen of your Mac.
        >
        > NOTA BENE: Using the script as described below is probably not
        > recommended, and could possibly mess things up. It has been
        > thoroughly tested for a week, though, and so far hasn't caused any confli=
        cts
        or other
        > problems. For me, that is.
        >
        > Here's how it works:
        > Whenever you receive a new mail it will be announced on the screen of
        > your Mac, saying either "Reply from X", "Forwarded mail from X" or
        > "New mail from X". (Hence you don't have to open Mail to see what the fuz=
        z
        is
        > all about.)
        >
        > If you are away from your computer, just press "No" on the phone when
        > you hear the Mail alert and a message will pop up and tell you all
        > about it (sender, subject, and even mail content). If you've received mor=
        e
        > than one mail, the pop up message will tell you how many and display the =

        most
        > recent one. (You can of course press any key you like, but other keys tha=
        n
        "No" will
        > result in a Clicker action. For example if you are using the iTunes Contr=
        oller,
        clicking
        > "Yes" will pause iTunes while you are reading your mail.) If the mail is =
        in
        HTML format
        > (graphical) Salling Clicker will not be able to display it, and tell you =
        so.
        >
        > Since pop up messages are limited to 160 characters you might not get
        > to read the whole mail, but you will at least get an idea of if it's
        > worth leaving your sofa for. If you want to be able to read the whole mai=
        l,
        > see the hint on how to disable the 160 character limit posted somewhere i=
        n
        this
        > forum. I haven't tried this yet, so I'm not sure if it works.
        >
        > So, no need to anxiously use any of the Check For New Mail-scripts
        > anymore (and, if lucky, consult your computer to actually read them).
        > Perhaps the best part is that you can now remove the Check For New Mail
        script
        > and make room for something more useful in the main menu, since this
        script is not
        > to be used with Salling Clicker, but with Mail.
        >
        > Here's how to do it (if you haven't guessed already):
        > Copy the script below and paste it into Script Editor. Save the
        > script. Open Mail. In Preferences, choose Rules and Add Rule. Set
        > the first condition to Any and the second to Every Message and choose Run=

        > Applescript as the perform action. Choose the script you just saved, and =

        make sure
        > the rule is the first one in the list of rules. Otherwise it will not wor=
        k. That's it.
        >
        > The script is based on the various Speak Mail scripts found on
        Macosxhints.com. Not
        > sure who to give credit.
        >
        > Enjoy,
        > Oidipa
        >
        >
        > on perform_mail_action(info)
        > try
        > tell application "Mail"
        > set unreadMail to 0
        > set everyMail to |SelectedMessages| of info
        > repeat with eachMail in everyMail
        > set unreadMail to (unreadMail + 1)
        > set fromAddress to sender of eachMail
        > set breakAddress to " <"
        > set nameEnd to the offset of breakAddress in fromAddress
        > if nameEnd is not 0 then
        > set FromName to (characters 1 through nameEnd of fromAddress) as string
        > end if
        > set mailSubject to subject of eachMail
        > set mailContent to content of eachMail
        > if mailSubject contains "Re:" or mailSubject contains "re:" then
        > set screenMsg to "Reply from " & FromName
        > else if mailSubject contains "Fwd:" or mailSubject contains "fwd:" then
        > set screenMsg to "Forwarded mail from " & FromName
        > else
        > set screenMsg to "New mail from " & FromName
        > end if
        > tell application "SEC Helper"
        > show screen message screenMsg
        > end tell
        > delay 2
        > end repeat
        > if unreadMail is 1 then
        > set popupMsg to "New mail from " & FromName & "- " & mailSubject & ": " &=

        > mailContent
        > else if unreadMail is not 1 then
        > set popupMsg to unreadMail & " new mails. Most recent from " & FromName
        & "- " &
        > mailSubject & ":" & mailContent as string
        > end if
        > tell application "SEC Helper"
        > enter popup mode text popupMsg
        > end tell
        > end tell
        > on error
        > tell application "SEC Helper"
        > enter popup mode text "Sorry! Can't display new mail."
        > end tell
        > end try
        > end perform_mail_action
      • Marook Zuug Kenja
        While this is not a Networking helpdesk, here goes anyway... ;-) On fredag, maj 30, 2003, at 13:49 Europe/Copenhagen, kaneda_tatsaki ... Well, DHCP is only
        Message 3 of 7 , May 30, 2003
        • 0 Attachment
          While this is not a Networking helpdesk, here goes anyway... ;-)

          On fredag, maj 30, 2003, at 13:49 Europe/Copenhagen, kaneda_tatsaki
          wrote:

          > Btw I have some problems getting Mails via DHCP.
          > My Mac is DHCP client of my PeeCee DHCP Server and everything works
          > great so far but getting Mails is a problem. Mail recognizes that
          > there are new Mails but doesn´t download them from server. It woun´t
          > download no matter if firewall is active or not so can nebody help and
          > tell me what to set up to be able to get Mails over DHCP please.

          Well, DHCP is only for giving your Mac an IP address, so if you get an
          IP address and Mail can get the headers, it's not because you're using
          DHCP!

          If you're Telnet savvy, you can telnet into your mail account, and see
          if that works. If so, Mail sould be able to do it also.

          Do you use POP or IMAP? How is your network put together? Are you
          sharing the connection through your PeeCee?

          If needed, contact me privately...

          ____________________________________________
          Jakob Peterhänsel
          Technical Engineer
          Tel: +45 7022 1014
          Fax: +45 7022 1013
          Mob: +45 40 16 38 06
          jp@...
          www.NetPoint.com
        • kaneda_tatsaki
          Hi Marook thnx for responding ya I know it´s no Network helpdesk but didn´t know wher= e else I should ask :) I know it´s just getting an IP for Mac but
          Message 4 of 7 , May 30, 2003
          • 0 Attachment
            Hi Marook
            thnx for responding ya I know it´s no Network helpdesk but didn´t know wher=
            e
            else I should ask :)
            I know it´s just getting an IP for Mac but using a direct PPP connection to=
            my
            provider everything works.

            So I have a 5 port switch
            1. Port is DSL
            2. Port is to my first Network adaptor of PeeCee
            3. Port is loopbacked to switch from the second Network adaptor of PeeCee
            4. Port is the connection to Mac

            I did so in order to be able to share connection with PeeCee using DHCP or =

            establish a connection directly to my Provider.
            With this config I can surf with both of them or just with the Mac just by =

            changing network settings and without replugging a cable.
            Going directly - Mail works great but sharing connection Mail doesn´t work.=


            How do I telnet to my Mail account ? (what IP do I need to telnet to)

            Running Win XP and MacOS 10.2.6
            Sharing devices works and sharing parallel printer on PeeCee using Samba
            works as well - only Mail makes probs :(

            I think it´s a f*****g PeeCee prob or ?

            I use a POP connection to GMX

            Thnx again to all of you for the great help on this board



            --- In ericssonclient@yahoogroups.com, Marook Zuug Kenja <marook@c...>
            wrote:
            > While this is not a Networking helpdesk, here goes anyway... ;-)
            >
            > On fredag, maj 30, 2003, at 13:49 Europe/Copenhagen, kaneda_tatsaki
            > wrote:
            >
            > > Btw I have some problems getting Mails via DHCP.
            > > My Mac is DHCP client of my PeeCee DHCP Server and everything works
            > > great so far but getting Mails is a problem. Mail recognizes that
            > > there are new Mails but doesn´t download them from server. It woun´t
            > > download no matter if firewall is active or not so can nebody help and =

            > > tell me what to set up to be able to get Mails over DHCP please.
            >
            > Well, DHCP is only for giving your Mac an IP address, so if you get an
            > IP address and Mail can get the headers, it's not because you're using
            > DHCP!
            >
            > If you're Telnet savvy, you can telnet into your mail account, and see
            > if that works. If so, Mail sould be able to do it also.
            >
            > Do you use POP or IMAP? How is your network put together? Are you
            > sharing the connection through your PeeCee?
            >
            > If needed, contact me privately...
            >
            > ____________________________________________
            > Jakob Peterhänsel
            > Technical Engineer
            > Tel: +45 7022 1014
            > Fax: +45 7022 1013
            > Mob: +45 40 16 38 06
            > jp@n...
            > www.NetPoint.com
            >
            >
            >
            >
            >  The information contained in this message is confidential or protected
            > by law.
            > If you are not the intended recipient, please contact the sender and
            > delete this message. Any unauthorised copying of this message or
            > unauthorised distribution of the information contained herein is
            > prohibited.
          • barthex
            ... Not ... Well, it seems the pop-up display is not showing up. at first I thought I had to be playing with accessories on my phone to be able to have it,
            Message 5 of 7 , May 31, 2003
            • 0 Attachment
              --- In ericssonclient@yahoogroups.com, "oidipa_maas" <kastner@t...> wrote:
              > Dear Clickers,
              > > >
              > If you are away from your computer, just press "No" on the phone when
              > you hear the Mail alert and a message will pop up and tell you all
              > about it (sender, subject, and even mail content). If you've received more
              > than one mail, the pop up message will tell you how many and display the most
              > recent one. > Here's how to do it (if you haven't guessed already):
              > Copy the script below and paste it into Script Editor. Save the
              > script. Open Mail. In Preferences, choose Rules and Add Rule. Set
              > the first condition to Any and the second to Every Message and choose Run
              > Applescript as the perform action. Choose the script you just saved, and make sure
              > the rule is the first one in the list of rules. Otherwise it will not work. That's it.
              >
              > The script is based on the various Speak Mail scripts found on Macosxhints.com.
              Not
              > sure who to give credit.
              >

              Well, it seems the pop-up display is not showing up. at first I thought I had to be
              playing with "accessories" on my phone to be able to have it, but to no avail either...

              Is this a limitation of the T68i (my phone)?
              Or is there a way to get SEC helper to generate a pop-up or a messagebox on the
              phone, whatever mode the phone is (apart from screensaver mode, maybe)
              I do have the pop-up "bluetooth connection lost" appearing on the screen, so pop-
              ups must be able to be displayed anytime.
              But I haven't managed to get SEC helper to create a spontaneous popup or
              messagebox on my phone...
              (I tried to have a iChat warning message, whenever a message would be IM'd to iChat,
              but I had to give up)
            • Jonas Salling
              You cannot flash popups on the display with Clicker in this version. While it is possible, there are simply too many inconvenient consequences (depending on
              Message 6 of 7 , May 31, 2003
              • 0 Attachment
                You cannot flash popups on the display with Clicker in this version.
                While it is possible, there are simply too many inconvenient
                consequences (depending on what's going on in the phone UI at the time).

                best,
                Jonas

                On lördag, maj 31, 2003, at 15:05 Europe/Stockholm, barthex wrote:

                > --- In ericssonclient@yahoogroups.com, "oidipa_maas" <kastner@t...>
                > wrote:
                >> Dear Clickers,
                >>>>
                >> If you are away from your computer, just press "No" on the phone when
                >> you hear the Mail alert and a message will pop up and tell you all
                >> about it (sender, subject, and even mail content). If you've received
                >> more
                >> than one mail, the pop up message will tell you how many and display
                >> the most
                >> recent one. > Here's how to do it (if you haven't guessed already):
                >> Copy the script below and paste it into Script Editor. Save the
                >> script. Open Mail. In Preferences, choose Rules and Add Rule. Set
                >> the first condition to Any and the second to Every Message and choose
                >> Run
                >> Applescript as the perform action. Choose the script you just saved,
                >> and make sure
                >> the rule is the first one in the list of rules. Otherwise it will not
                >> work. That's it.
                >>
                >> The script is based on the various Speak Mail scripts found on
                >> Macosxhints.com.
                > Not
                >> sure who to give credit.
                >>
                >
                > Well, it seems the pop-up display is not showing up. at first I
                > thought I had to be
                > playing with "accessories" on my phone to be able to have it, but to
                > no avail either...
                >
                > Is this a limitation of the T68i (my phone)?
                > Or is there a way to get SEC helper to generate a pop-up or a
                > messagebox on the
                > phone, whatever mode the phone is (apart from screensaver mode, maybe)
                > I do have the pop-up "bluetooth connection lost" appearing on the
                > screen, so pop-
                > ups must be able to be displayed anytime.
                > But I haven't managed to get SEC helper to create a spontaneous popup
                > or
                > messagebox on my phone...
                > (I tried to have a iChat warning message, whenever a message would be
                > IM'd to iChat,
                > but I had to give up)
                >
                >
                >
                > ------------------------ Yahoo! Groups Sponsor
                > ---------------------~-->
                > Get A Free Psychic Reading! Your Online Answer To Life's Important
                > Questions.
                > http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/EGnolB/TM
                > ---------------------------------------------------------------------
                > ~->
                >
                > To unsubscribe from this group, send an email to:
                > ericssonclient-unsubscribe@yahoogroups.com
                >
                >
                >
                > Your use of Yahoo! Groups is subject to
                > http://docs.yahoo.com/info/terms/
                >
                >
              • Kaneda
                Hi Marook : ) Thnx for your Help. Today I added a route and now it works great. Best Matthias
                Message 7 of 7 , Jun 2, 2003
                • 0 Attachment

                   

                  Hi Marook : )

                   

                  Thnx for your Help.

                  Today I added a route and now it works great.

                   

                  Best Matthias

                Your message has been successfully submitted and would be delivered to recipients shortly.