Jump to content

Search email?


Recommended Posts

[Admin note from Vero: This method is not recommended as it will add a lot of noise to your search results. Please see my post further down this page for a "Search Mail" workflow instead.]

 

I'm thinking I'm being a doofus because I can't find info so that leads me to wondering if it's obvious.

 

Will Alfred search my emails? please? how?

 

Thanks!

 

Alfred will search through Mail.app's emails when you enter File Search (keyword 'find')

 

 

Here's a workflow that will search emails when you type 'mail {your entry here}': Search Mail by Tyler Eich

 

To include them in the default results, do this:

  1. Add ~/Library/Mail/V2 to your search scope
  2. Add a .emlx file under the 'Advanced...' button (find a .emlx file @ '~/Library/Mail/V2/{IMAP or POP}-{your account here}/{mailbox}.mbox/All Mail.mbox/{randomly named folder}/Data/{number}/Messages/'

Mail%20Default%20Results.jpg

 

Cheers  :)

Link to comment
  • 2 months later...
  • 3 months later...

I can't seem to find or add "~/Library/Mail/V2" to the Search Scope. There doesn't seem to be such a place on my computer.

 

Also, when I drag and drop the user-defined file type "Search Email.alfredworkflow" into the window, it says "com.runningwithcrayons.alfred.wo... Alfred Workflow" instead of looking the same as your screenshot.

(I'm very new to this and not particularly Mac-savvy)

Regards,

 

Ryan

 

 

Link to comment
On 10/10/2013 at 3:03 AM, Ryan Ashton said:

 

 

It is significantly more efficient to use a workflow to search email than to add it to default results. If your email influx is anything like mine, I wouldn't recommend adding these thousands of emails adding noise to default results!

 

I've created a workflow for searching Mail.app emails, which you can grab here:

https://www.dropbox.com/s/5h3djhw2thf8xjp/Mail.app Search 3.0.alfredworkflow?dl=0

 

In short, this workflow uses three keywords:

 

  • emfrom to search the sender's name and email address
  • em for a general subject + content search
  • emsubj to search specifically for a subject line

So you'd type "emfrom Ryan" to look for an email where the sender's name or email address contains "Ryan". :)

Link to comment

Great workflow, thanks, Vero

 

On 10/10/2013 at 11:23 AM, Vero said:

It is significantly more efficient to use a workflow to search email than to add it to default results. If your email influx is anything like mine, I wouldn't recommend adding these thousands of emails adding noise to default results!

 

I've created a workflow for searching Mail.app emails, which you can grab here:

https://www.dropbox.com/s/5h3djhw2thf8xjp/Mail.app Search 3.0.alfredworkflow?dl=0

 

In short, this workflow uses three keywords:

 

  • emfrom to search the sender's name and email addressem for a general subject + content search
  • emsubj to search specifically for a subject line

So you'd type "emfrom Ryan" to look for an email where the sender's name or email address contains "Ryan". :)

 

Great Workflow, thanks, Vero

Link to comment

I love this workflow and am using it for my Mail. Unfortunately I'm also using Thunderbird for other mail (had to switch because Mail was leaving too many processes open and my ISP was shutting down my site.)  Seems to me I should be able to modify Vero's workflow to add Thunderbird but I'm having a hard time figuring out what the "file type" should be.

 

I think it is in ~library/thunderbird/Profiles/9olcaydl.default/ImapMail  but all the folder in there have extensiosn like. msf and .sbd and I can drag them into the add box on the file types.

 

I'm in over my head.  All I want is for Alfred to search Thunderbird! Maybe I should be using a different client?  Open to suggestions. I do have a friend who would tell me to use gmail. Is that an good answer?

Link to comment

I love this workflow and am using it for my Mail. Unfortunately I'm also using Thunderbird for other mail (had to switch because Mail was leaving too many processes open and my ISP was shutting down my site.)  Seems to me I should be able to modify Vero's workflow to add Thunderbird but I'm having a hard time figuring out what the "file type" should be.

 

I think it is in ~library/thunderbird/Profiles/9olcaydl.default/ImapMail  but all the folder in there have extensiosn like. msf and .sbd and I can drag them into the add box on the file types.

 

I'm in over my head.  All I want is for Alfred to search Thunderbird! Maybe I should be using a different client?  Open to suggestions. I do have a friend who would tell me to use gmail. Is that an good answer?

 

As far as I know, Thunderbird doesn't make its data available for searching, so I don't think it'll be possible (though if Thunderbird has evolved, I hope someone will pop their head in to help)

 

As far as Mail goes, I'd suggest switching off things like "Store draft messages on server" (under Accounts > Mail Behaviour) for any accounts you have, which might ease things a bit as it won't connect every three seconds. You should then be ok to use the Mail workflow.

Link to comment
  • 2 weeks later...

Hi Vero,

Thanks for the workflow. I'm on Day One with Alfred, so excuse me if I'm being dense. I had a mail that I somehow disappeared today. It was nowhere to be found - then via a web search I discovered that if you have the mail app on top you can search thorough Time Machine - and I found the mail I lost.

 

Given this recent and very frustrating episode, I wanted to check out how Alfred could help. So I downloaded your WFl and tried by typing "emfrom krzysztof" (and yes I'm spelling that right!) -  the workflow result bit displays but no result was returned, but I can see an email from this guy staring me in the face. It seems to work okay using the other two keywords though. What am I missing?

Edited by hjuk
Link to comment

Hi Vero,

Thanks for the workflow. I'm on Day One with Alfred, so excuse me if I'm being dense. I had a mail that I somehow disappeared today. It was nowhere to be found - then via a web search I discovered that if you have the mail app on top you can search thorough Time Machine - and I found the mail I lost.

 

Given this recent and very frustrating episode, I wanted to check out how Alfred could help. So I downloaded your WFl and tried by typing "emfrom krzysztof" (and yes I'm spelling that right!) -  the workflow result bit displays but no result was returned, but I can see an email from this guy staring me in the face. It seems to work okay using the other two keywords though. What am I missing?

 

Just to be clear, did you 'Restore' that email from Time Machine back onto your computer? The workflow won't find emails that aren't Mail.app's email folders.

 

Welcome to Alfred :)

Link to comment
  • 3 years later...

Hi @Vero - I recently downloaded your workflow from Packal. It's great!! Thanks for sharing.

 

Quick question: Is it possible to make the search results open up within the Mail app, so that the message can be seen as a part of it's larger thread (when relevant)? 

 

Or, alternatively, is it possible for the search to favor the most recent message when there is more than one result within a thread (e.g., more than one message with the same subject line or whatever Mail uses to organize threads). 

 

At the moment, it's a little difficult clunky when reviewing messages that are part of larger threads (e.g., search results don't indicate differences for messages in a thread - e.g., dates, etc), which often necessitates open numerous results to find the right one.

 

Thanks for your help!!

Link to comment

@Jasondm007 I've had a look around, and it doesn't seem possible to show the result in Mail within its conversation, based on what Mail itself allows.

 

For the message recency side of things, I'd suggest copying one of the existing filters within the workflow, and adding a Date Range:

 

Screen Shot 2017-08-16 at 11.41.18.png

 

This won't necessarily show the messages in date order, but will exclude anything older than the date range you select, making results cleaner for you. :)

 

Cheers,

Vero

 

Link to comment
  • 1 year later...

Hi All, need help with the Search mail.app workflow.

 

WHen i type in 'em", alfred gives me the option to 'Search mail

 

However once i start typing in my search quiery, it changes the option to 'Search Google'.

 

Essentially this means i cannot use this workflow at all because as soon as i type in a quiery, the optino to search within my email disappears.

Screen Shot 2018-09-28 at 10.38.28 AM.png

Link to comment

@needalfredhelp Welcome to the forum!

 

First, which email client do you use?

 

This particular workflow is for Mail.app only, as the workflow is a file filter that searches for com.apple.mail.emlx files in the ~/Library/Mail/ path. If the location or file type is different, this File Filter won't apply.

 

If you do use Mail.app, could you confirm which version of macOS and Alfred you're using? We can then take it from there :)

 

Cheers,
Vero

Link to comment

Hi, thanks for your replies.

I am using macOS Mojave, and I am using the latest verion of Alfred as I only purchased/downloaded it a few days ago.

I am running  the same setup on my Macbook Pro as well as my imac at my workplace.

My email client of choice is Mail.app by apple across all my devices.

 

I don't understand why Alred would immediately switch back to the fallback search options as soon as i start typing a quiery. I think there is something wrong in the way the workflow is setup on my computer.

I am still stumped by this. 

Link to comment

I also just tried to widen the scope of search to includ eeverything on my entire harddisk, and I am still not able to find anything with the workflow.

The very instant i start typing the first letter of the search quiery, Alfred switches from searching within mail to searching the fallback options.

 

I am also having this same issue with some other workflows which is supposed to search my Omnifcous inbox.

Link to comment
  • 3 months later...
  • 9 months later...

@Nooblet Welcome to the forum :) Which version of macOS are you using? If you're using Mojave and earlier, you should be able to get this workflow working.

 

However, if you're on Catalina, it's not currently possible to search email; Apple have removed access for third-party apps to Mail.app results by excluding it from the Spotlight metadata that apps like Alfred can use to return results.

 

 

I'll keep the thread linked above updated if Apple change anything sufficiently for us to search email again.

 

Cheers,
Vero

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...