EmailDiscussions.com  

Go Back   EmailDiscussions.com > Email Service Provider-specific Forums > FastMail Forum
Register FAQ Members List Calendar Today's Posts
Stay in touch wirelessly

FastMail Forum All posts relating to FastMail.FM should go here: suggestions, comments, requests for help, complaints, technical issues etc.

Reply
 
Thread Tools
Old 26 Mar 2016, 02:41 AM   #1
ao1
Essential Contributor
 
Join Date: Oct 2003
Posts: 327
searching for quotes

I am trying to search for "To" fields containing quotes.

For example, I want to find
Code:
"myname" <myname@example.tld>
But neither of:
Code:
myname <myname@example.tld>
<myname@example.tld>
myname@example.tld
the help says:
Quote:
If you want to search for a phrase with spaces in it, use quotes for the phrase part (either ' or ", but matched), e.g. from:"Joe Bloggs" or subject:'string with "double" quotes', but not from:Joe Bloggs or subject:"must end with same'. You can also use \", \' and \\ to match a literal ", ' and \ respectively in a phrase.
I tried the following search expression:
Code:
in:* to: '"myname" <myname@example.tld>'
in:* to: '\"myname\" <myname@example.tld>'
in:* to: "\"myname\" <myname@example.tld>"
but they all return heaps of false positives.

I also tried using substr() in all the combinations above which returned zero matches.

Please advise.
ao1 is offline   Reply With Quote

Old 7 Apr 2016, 04:15 PM   #2
cyberpear
Member
 
Join Date: Nov 2012
Posts: 40
If you are trying to search and find names in the "to" header, but only names that have quotes around them, you will not be able to directly, as the quotes are stripped out by the search and only the parsed name and e-mail address are searched.

If you are trying to find a to that is of the form:
Quote:
Firstname "nickname" Lastname
, you can search that with the following:

Code:
imap:'to "Firstname \\"nickname\\" Lastname"'
If you REALLY want to find to headers that have quotes around the name, you can use the following, but be aware that it can be very resource-intensive on fastmail's servers:

Code:
imap:'TO myname@example.tld TEXT "\\"myname\\" <myname@example.tld>"'

Let me know if this helps!

Edit: this could also turn up false positives if the body of the e-mail has
Quote:
"myname" <myname@example.tld>
in it

Last edited by cyberpear : 7 Apr 2016 at 04:19 PM. Reason: Clarification
cyberpear is offline   Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +9. The time now is 01:31 AM.

 

Copyright EmailDiscussions.com 1998-2022. All Rights Reserved. Privacy Policy