How to Put Mac To Sleep Using an Email and Dis­able Mail Previews

This article is about How to Put Mac To Sleep Using an Email and Dis­able Mail Previews. So read this free guide, How to Put Mac To Sleep Using an Email and Dis­able Mail Previews step by step. If you have query related to same article you may contact us.

How to Put Mac To Sleep Using an Email and Dis­able Mail Previews – Guide

There is no denying that on OS X, Mail is easily one of the most useful applications to download, read and work with your email on a daily basis. However, as useful as you might consider the native email application, there is actually a lot more you can do with it, knowing only a few tricks, which is exactly what we will show in this post.

Prepare? Let’s get going.

back to menu ↑

Put your Mac to sleep with an email

This is really cool tip which requires a little bit of advanced tweaking and creating your own Apple script (but don’t worry, we’ll explain everything here), but as soon as you set it up up, you can make your Mac fall asleep by sending yourself an email from one of your accounts.

This can be very useful for those of us who tend to forget things, including putting our Macs to sleep when we leave the office, for example.

Here it is how to to define up that pure trick.

Step 1: Open the AppleScript Editor utility (located in the Utilities folder) and copy and paste into the editor:

tell the “System Events” app to sleep

After doing this, press the Build button button until everything looks like the screen below.

Apple Script Editor

Finally, give your script a name and save it in the ‘Script’ format.

Save script

Saved script

You will have to save the script in the folder shown in the photo below (~ Library / Application Scripts / for it to work.

Saved script location

Step 2: Open the Mail Preferences panel and click the Rules tab. There, click on Add Rule button and set these parameters:

Add rule


– If: All– From – Contains: Your email address– Subject – Equals: Sleep

Perform the following actions:

– Run Apple Script: Choose the script you just created

Once this is done, press OK.

Set of rules

With that, every time you send an email to yourself (from your specified email account) with the word ‘Sleep’ as the subject, Mail will trigger the script you created and put your Mac to sleep.

Mail sent

If you have an iPhone, send an email to yourself and you will see the Mac go into standby immediately. Very cool if you ask me.

back to menu ↑

Disable visual attachment views

One of the best aspects of the native OS X Mail application for me is that if someone sends you an attachment in an email, Mail allows you to view it directly in the message, displaying a preview of it. Whether it’s a PDF file, an Office document or just a photo, you don’t even have to click on the file to see it.

On some occasions, however, it is preferable that Mail does not show previews of attached files. For example, let’s say you’re checking your email in a public place and don’t want anyone else to see your files.

With the help of the Terminal utility, you can disable views in Mail in just a few seconds.

To do this, just open the Terminal and type this command:

patterns write DisableInlineAttachmentViewing -bool yes

Then, restart Mail and, instead of visual visualizations of the attachments, Mail will display only its icons.

Mail with preview

Mail without preview

If you want to see the attachments in Mail again, just use the same command shown above, but in final replace ‘yes’ with ‘no’. That’s it.

I hope you like these tips. Both are extremely useful and the first one in particular is very cool. Enjoy!

back to menu ↑

Final note

I hope you like the guide How to Put Mac To Sleep Using an Email and Dis­able Mail Previews. In case if you have any query regards this article you may ask us. Also, please share your love by sharing this article with your friends.