Jump to content
riaamp

Search email?

Recommended Posts

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!

 

Share this post


Link to post

[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  :)

Share this post


Link to post

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

 

 

Share this post


Link to post
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". :)

Share this post


Link to post

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

Share this post


Link to post

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?

Share this post


Link to post

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.

Share this post


Link to post

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

Share this post


Link to post

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 :)

Share this post


Link to post

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!!

Share this post


Link to post

@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

 

Share this post


Link to post

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

Share this post


Link to post

@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

Share this post


Link to post
3 hours ago, needalfredhelp said:

as soon as i type in a quiery, the optino to search within my email disappears

 

The option hasn't disappeared—the workflow simply found no results.

 

Alfred's default behaviour when a search or workflow returns no results is to show its Fallback Searches, which is what you're seeing.

Share this post


Link to post

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. 

Share this post


Link to post

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.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...