I am logging into gmail via python and deleting emails. However when I do a search for two emails I get no results to delete.
mail.select('Inbox')
result,data = mail.uid('search',None '(FROM target.com)')
The above works and will find and delete any email that had target.com in the from address. However when I send in another email address I get nothing.
result,data = mail.uid('search',None '(FROM "target.com" FROM "walmart.com")')
Yes I have both target.com and walmart.com emails in my inbox.
Gmail search is exactly like Searching in the gmail website. If you open that and click the arrow down buttom in the search field you can test things.
That being said searching on more then one address is not going to work as its going to look for emails that are by both people. Not all emails containing one or the other.
The following will look for mails that both come from tom and jon. probably not possible as you cant have two senders
from:(tom#gmail.com,jon#comcast.net)
where as will return all mails that come from gmail.com
from:(gmail.com)
will only return mails sent from gmail.com and comcast.net which inst possible
from:(tom#gmail.com,comcast.net)
your going to have to make two requests.
You can search set this type of filter:
from:(demo#gmail.com OR demo1#yahoo.com)
Related
I'm sorry I am not sure the proper wording to explain this issue.
I have constantly been receiving emails such as the one I attached (at the bottom). Altough I am able to block emails from "Order_Shipment", several email addresses remain sending messages to PennyV1#aol.com as well as PennyYA#aol.com, which is redirected to me. I could not find a way to block these two emails. I get several emails daily through them, and I would like it to stop.
Things I tried:
1 - Searched in the google settings, and couldn't find anywhere how to specifically block an email by typing the address.
2 - The three vertical dots on the left allows me to block the specific email from Order_Shipment, this does not solve the problem as the real problem is blokcing PennyV1 and PennyYA.
3 - Sent an email to PennyV1#aol.com as well as PennyYA#aol.com in the hope they would sent me an email back so I can block them. My message got bounced back saying these emails don't exist.
I do not know how my email entered this email grouplist
You could try blocking their domain:
Like clicking "Block Quora Digest" in my case.
Option two would be two create a filter: https://support.google.com/mail/answer/6579?hl=en#zippy=%2Ccreate-a-filter
I have just started to use Kentico, so far everything has been straight-forward however I cannot get certain Macro's to work in Marketing Emails (to insert personalized information in the email such as their country).
Here is a quick overview of my automation process
Person submits a form on the website
Form field information gets mapped to the contact
Automation process begins
Internal/Transactional email sent which contains the requesters information (Macro's work)
Marketing email sent to requester, containing relevant information (Only basic Macro's work (for example recipient.firstname))
The issue is that the Macro's that are used (and working) in the internal transactional email do not appear to work in the marketing emails section, for example: {% OnlineMarketingContext.CurrentContact.ContactCountry #%} would copy in the requesters Country in the transactional/internal email, but it remains blank in marketing emails (Note: I have tested this fully, not as a draft email as I've read that the information doesn't get passed in a draft email).
I have tried using different objects (ContactManagementContext, etc.), however nothing appears to bring in personalized information.
Is there something I need to do to get the Macro's working within the Marketing Emails section? I have read through the docs online and I can't find anything to make this work.
Any help would be greatly appreciated.
The newsletter email macros are based off the subscriber not the contact. If you want to use the contact info, you will have to find a way to relate the subscriber to the contact.
This video shows how to see what macros are available.
Zach is correct. Normally, you would lookup the Contact based on the email address of the Recipient, e.g. {%GlobalObjects.Contacts.Where("ContactEmail = '"+Recipient.Email+"'").TopN(1).FirstItem%}. However, there is a hidden object you can use in marketing emails: {%Advanced.ContactInfo%}
I am developing an android app based on gmail-api in which I need to show how many mails are unread (based on a particular sender/subject) , and also need to show how many mails the user has not replied to (based on a particular sender/subject) . If anybody has done this pls let me know if this is feasible.
You need to use Users.messages: list method since it only return messages that match the specified query. It supports the same query format as the Gmail search box. For example, from:someuser#example.com rfc822msgid: is:unread.
Based also from this related SO ticket, the q parameter (query) can be all kinds of stuff and it is the same as the gmail search bar on the top of the web interface. You can use this search method to find unread messages, for example like
List<Message> unreadMessageIDs = ListMessages(service, "me", "is:unread");.
Hope this helps! :)
I'm pulling email from a non-Gmail account into my Gmail inbox. Unfortunately, that account gets a lot of spam but Gmail correctly moves it to the "spam" pseudo-folder.
I'd like to know if there's a way to set up a filter with the equivalent of this query: "If message addressed to [my non-Gmail account address] AND in:spam" and then have the filter auto delete any matching messages.
I know I can manually view spam, select all, and delete, but I'd rather have a filter do it. That way, the only remaining spam is from my regular account, which I like to do a quick scan on before deleting in case there are any false positives.
Gmail's filtering either doesn't seem to allow for "in:spam" type qualifiers or won't auto-execute such a filter.
Any ideas?
Gmail warns you that the "is" operator will not match on incoming mail, but actually it works perfectly well at the moment. I use it in my filters, and so do other people (example: https://webapps.stackexchange.com/questions/31042/how-can-i-auto-delete-some-spam-from-gmail).
My website sends emails to me with the same subject and they are being grouped into conversations even if I delete old ones (Mail, Gmail). I know I can change the subject to prevent this, but is there a header or something else that can be added to do this without forcing unique subject lines?
On the top of my head, there are two methods to avoid threading:
set the SMTP header X-Entity-Ref-ID with any value. This is what Google+ notifications do.
change the sender email (you can use From: info+randomstring#example.com). This is what Facebook notifications do.
The threading will be made if you force it with Reference or Reply-To.
The situation has changed since 2019.
I found a solution in https://workspaceupdates.googleblog.com/2019/03/threading-changes-in-gmail-conversation-view.html.
Setting a header of the form References: <---uuid---#youremailproviderhere.com>, with a unique UUID for each email is enough to solve this.
Tested a few times today and I confirm it works.