Analytics


Google
Showing posts with label Gmail. Show all posts
Showing posts with label Gmail. Show all posts

Friday, July 31, 2015

Forward Mails Based on Search Criteria

Have you ever wanted to forward all mails that matching a search expression? That option is not available through the Gmail interface but it is relatively easy to do that with a script.

An example of the script is as follow:

function forwardMail() {
  var threads = GmailApp.search("before:2009/07/01 after:2009/06/30"); // second search string.
 
  for (var i in threads) {
    var lastMsg = threads[i].getMessageCount(); //get last message
    var messages = threads[i].getMessages();
   
    var message = messages[0]; //first mail in the thread
    //var message = messages[lastMsg-1]; // last mail in the thread
    message.forward("strovek@seagate.com");
   
  }
}







Notes:

In the example above, you can use messages[0] to select the first message in a thread or messages[lastMsg-1] for the last message in a thread.  The last message will usually contains most of the replies of the threads if the participants are the same throughout the thread conversations.



To make sure you get the mails you want to forward, test the search expression in Gmail first.

Wednesday, February 16, 2011

Avoiding and fixing contact synchronization between Android and Gmail

I encountered a problem synchronizing the contacts on my new Android phone recently and found that others have encountered similar problems but have not found any solutions on internet.  I finally solved the problem and am sharing it here.

The main cause in my case was the Google Device Policy App.

Avoidance

To avoid the problem be sure to successfully synchronize all your Google accounts before activating the Google Device Policy app.

Fix

If you activated the Google Device Policy app before you successfully complete the synchronization of all your Google Accounts, you may find that the contacts synchronization will not work.

To fix it:

Force stop the Google Device Policy App (to do that go to Settings -> Applications -> Manage Applications -> (find Device Policy) ->
Then go to Accounts & sync to synchronize all your Google accounts.
Once done, you can reactivate your Device Policy App by finding the app under All apps and click on it activate it against your corporate account.

Additional Note


I found another contributing factor to the synchronization has to do with illegal characters in your contact information.  If you have ' in your contact name, it will also cause all the synchronization to stop.  The only way to fix is to remove the illegal characters and then reset the device back to factory config and then set it up again.

However, before you do that, try rebooting your device first.   This may sometimes fix the problem so you don't have to go through the hassle of reconfiguring everything.  I have tried rooting and backing up using Titanium backup but it did not allow me to restore everything.

Friday, December 3, 2010

How to set up automatic alert using Gmail and GCalendar

This is how you can set up an automatic alert that will send out email to a group on a fixed schedule. It is a two step process.

Step 1

Create a Calendar entry in your Google Calendar. Specify the time and also check the repeat, the specify the repeat frequency, daily, weekly, monthly etc.



Make sure to have add Email Reminder.


Step 2

From Step 1, you should receive an email from your calendar about 10 minutes (or what ever time you set before the actual time.

After receiving the first alert, create a filter from it.  The mail will be from calendar-notification@google.com.

So create your filter, as follow:


In the Has the words field, key in the words that match your calendar title. Then click Next Step.


Select Forward it to: and then enter the email you want to forward the alert to.  If you are using a corporate gmail account, you can use groups created by your company admin.  If you are using the free public gmail account, each filter can only be forwarded to one email account and also the recipient need to agree by either clicking on a link or to send you back the authorization code.



Thursday, October 21, 2010

Gmail advanced search options

This is a bookmark to Gmail advanced search option.  The original article is found here.



OperatorDefinitionExample(s)
from:Used to specify the senderExample: from:amy

Meaning: Messages from Amy
to:Used to specify a recipientExample:to:david
Meaning: All messages that were sent to David (by you or someone else)
subject:Search for words in the subject lineExample:subject:dinner
Meaning: Messages that have the word "dinner" in the subject
ORSearch for messages matching term A or term B*

*OR must be in all caps
Example: from:amy OR from:david
Meaning: Messages from Amy or from David
-

(hyphen)
Used to exclude messages from your searchExample: dinner -movie
Meaning: Messages that contain the word "dinner" but do not contain the word "movie"
label:Search for messages by label*

*There isn't a search operator for unlabeled messages
Example: from:amy label:friends
has:attachmentSearch for messages with an attachmentExample: from:david has:attachment
Meaning: Messages from David that have an attachment
list:Search for messages on mailing listsExample: list:info@example.com
Meaning: Messages with the words info@example.com in the headers, sent to or from this list
filename:Search for an attachment by name or typeExample: filename:physicshomework.txt
Meaning: Messages with an attachment name "physicshomework.txt"

Example: label:work filename:pdf
Meaning: Messages labeled "work" that also have a PDF file as an attachment
" "

(quotes)
Used to search for an exact phrase*

*Capitalization isn't taken into consideration
Example: "i'm feeling lucky"  Meaning: Messages containing the phrase "i'm feeling lucky" or "I'm feeling lucky"

Example:
subject:"dinner and a movie"

Meaning: Messages containing the phrase "dinner and a movie" in the subject
( )Used to group words

Used to specify terms that shouldn't be excluded
Example: from:amy (dinner OR movie) Meaning: Messages from Amy that contain
either the word "dinner" or the word "movie"

Example:
subject:(dinner movie)

Meaning: Messages in which the subject contains both the word "dinner" and the word "movie"
in:anywhereSearch for messages anywhere in Gmail*

*Messages in Spam
and
Trash are
excluded from searches by default
Example: in:anywhere movie

Meaning: Messages in All Mail, Spam, and Trash that contain the word "movie"
in:inbox

in:trash

in:spam
Search for messages in Inbox, Trash, or SpamExample: in:trash from:amyMeaning: Messages from Amy that are in Trash
is:important

label:important
Search
within messages that Priority Inbox considers important.
Example: is:important from:janet
Meaning: Messages from Janet that were marked as important by Priority Inbox
is:starred

is:unread

is:read
Search for messages that are starred, unread or readExample: is:read is:starred from:David  Meaning: Messages from David that have been read and are marked with a star
cc:Used to specify recipients in the cc: or bcc: fields*Example: cc:david
bcc:*Search on bcc: cannot retrieve messages on which you were blind
carbon copied
Meaning: Messages that were cc-ed to David
after:Search for messages sent during a certain period of time*Example: after:2004/04/16
before:2004/04/18
before:*Dates must be in yyyy/mm/dd format.Meaning: Messages sent between April 16, 2004 and April 18, 2004.*

*More precisely: Messages sent after 12:00 AM (or 00:00) April 16, 2004 and before April 18, 2004.
is:chatSearch for chat messagesExample: is:chat monkey  Meaning: Any chat message including the word "monkey".

Addendum (Nov 2012)

OperatorDefinitionExample(s)
size:Search for messages which is equal or greater than the size entered. Example: size:10M 
Meaning all messages that are 10 MB and above


Tuesday, October 27, 2009

Inserting formatted text in Gmail

In order to create formatted text in Google Mail - especially tables, first create the table in Excel then copy from Excel and paste it into mail you are composing GMail. Note that this will only work if you are using FireFox or Internet Explorer. It does not work with Chrome.

If you are using FireFox, you have an additional ability to delete content from the table by column or row.

One problem I have is when it is forwarded to Lotus NOTES, the fonts appear to run so some of the rows may contain strange highlights or fonts.

Friday, October 23, 2009

Highlighting Incoming Mails in GMail

Many of us are using Gmail as our main email system whether it is for personal or because the company we work for has outsourced the email system to Google. Since more and more communication is done through email, very often we receive many emails each day. As a result, we sometimes miss urgent email such as emails from a key client or from our bosses.

There is an easy way to help us highlight mails from specific senders or for specific subject; it is through the use of labels.

  1. For this to be effective, you need to first go and enable a gmail lab feature called Custom Label Colors.
  2. Next create the required filters. You can create filter to look out for mails from a specific sender or subjects containing certain keywords. The filter should have an action to apply a specific label (For example, “Key Customer”, “Management”, “Bosses Mail”); you can apply an existing label and create the label when you create your filter.
  3. Next click on the white check box next the label you created and select the color you want.

In future when you receive email that match the criteria specified in step 2, you can easily see it in your inbox.

This is the same article I wrote in Triond.

Friday, July 3, 2009

Moving from Lotus NOTES to Gmail

Found a good article on the above subject here.

The main highlight is the following note:

Note that there are some quirks with this process:

  • In Notes, all messages now have a forwarded status icon, but unlike normal forwards in Notes, the header doesn’t say where it’s been forwarded to.
  • Most formatting (font colors, bullets, numbers, etc.) of Notes email is lost (they appear as plain text). This seems to be an artifact of the Notes IMAP implementation. Strangely, email that is sent from the Notes client to non-Notes users appear to preserve the formatting, but mail forwarded via a rule does not preserve formatting.
  • Message counts between Notes and Gmail probably won’t match exactly. I initially thought that something was breaking in the copy process, but when I had a closer look, I realized Gmail automatically collapses duplicate messages into a single message. (We’ve got a couple team mailing lists and when I send to one, I get a copy sent back to me, so I had quite a few duplicate messages.) Also, because Labels are applied to an entire conversation, not just individual messages, some of my messages would appear in Gmail folders other than the one I had copied the message to.

Friday, May 1, 2009