Mail Weekend Reponse

Discussion in 'Mac Apps and Mac App Store' started by jakesaunders27, Apr 5, 2014.

  1. jakesaunders27 macrumors 6502a

    jakesaunders27

    Joined:
    Jan 23, 2012
    Location:
    United Kingdom
    #1
    Hi,
    Does anyone know how to automatically respond to any email that comes in at weekends, its for my business so it can say our hours are monday - friday etc.

    Thanks
     
  2. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #2
    Is this an iCloud email account?

    You can login to iCloud.com then in Mail click the little cog at the bottom left and you get this screen where you can setup a "vacation message" that would do what you want. You would need to login to iCloud.com every Friday evening an manually turn this on then turn it off Monday AM.

    [​IMG]
     
  3. jakesaunders27 thread starter macrumors 6502a

    jakesaunders27

    Joined:
    Jan 23, 2012
    Location:
    United Kingdom
    #3
    No its a domain email address, thanks anyway
     
  4. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #4
    Is it IMAP and are you using OS X Mail app to read mail.

    You could just leave a computer on with Mail running and setup a rule like this.

    [​IMG]

    If you click that reply message text button this pops up where you just enter what you want to say.

    [​IMG]

    You can find rules in Mail preferences.

    Ideally, this is something you would want running on your mail server, but if you do not have that ability this rule will work for you.

    You would have to enable/disable each weekend.
     
  5. jakesaunders27 thread starter macrumors 6502a

    jakesaunders27

    Joined:
    Jan 23, 2012
    Location:
    United Kingdom
    #5
    Wow that's perfect, thanks for that!
     
  6. kryten2, Apr 5, 2014
    Last edited: Apr 5, 2014

    kryten2 macrumors 6502a

    Joined:
    Mar 17, 2012
    Location:
    Belgium
    #6
    Or a rule that runs an Applescript with something like this :

    Code:
    -- Assuming working hours from 9 to 5
    -- time of (current date) will return the number of seconds elapsed since 12:00:00 AM that morning.
    
    ------------Mail rule Script----------------------------------------------
    using terms from application "Mail"
    	on perform mail action with messages theMessages
    		if weekday of (current date) is in {Saturday, Sunday} or time of (current date) < 32400 or time of (current date) > 61200 then
    			tell application "Mail"
    				repeat with theMessage in theMessages
    					set theSubject to subject of theMessage
    					set theContent to "Our opening hours are monday - friday from 9 to 5."
    					set theSender to sender of theMessage
    					set newMessage to make new outgoing message with properties {visible:false, subject:theSubject, content:theContent}
    					tell newMessage
    						make new to recipient at end of to recipients with properties {address:theSender}
    					end tell
    					send newMessage
    				end repeat
    			end tell
    		end if
    	end perform mail action with messages
    end using terms from
    
    ------------------Mail rule Script Ends here------------------------------
    (*
    Next block is for running the script in Script Editor with some mail messages selected in the Mail applictation. If everything works remove the entire block and attach script to rule.
    *)
    -----------------ONLY NEEDED FOR TESTING FROM WITHIN SCRIPT EDITOR--------
    tell application "Mail"
    	set myMessages to selection
    	tell me to perform mail action with messages myMessages
    end tell
    -----------------REMOVE WHEN TESTING IS DONE !!!!!!-----------------------
    Note : No need to enable/disable each weekend. It will only reply during weekends and weekdays from 5 o'clock untill 9 o'clock. If you only want the weekend then delete or time of (current date) < 32400 or time of (current date) > 61200 from the script. Not thoroughly tested but it should work.
     
  7. jakesaunders27 thread starter macrumors 6502a

    jakesaunders27

    Joined:
    Jan 23, 2012
    Location:
    United Kingdom
    #7
    Wow thanks! I never thought about AppleScript! Cheers!
     
  8. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #8
    Kryten is ace at this! :)
     

Share This Page