Possible Duplicate:
Get e-mail addresses from Gmail messages received

I teach a class on using Mathematica, and in the first "lab", the students enter their email address, and these are sent to a dummy email address I have set up just for this purpose (let's call it Math@gmail.com). So in this gmail account, I have many emails that are both To and From Math@gmail.com, the subject has some confirmation code in it (not important), and the body contains the actual email address of the student. Is there a way to extract these email addresses from the body of the messages, and add them to a contact list (Google+ Circle)? Or is there a better way to achieve my goal, which is automatically creating a list of emails for students in my class?


Can you not just look at the incoming emails into math@gmail.com? If you use the Gmail search bar to search for to:math@gmail.com you will see all incoming email to the dummy address.

The other thing Gmail will do is automatically add contacts to your contacts list for any emails to which you reply, reply-all, or forward. Here's a link to an article on automatically adding contacts: http://support.google.com/mail/bin/answer.py?hl=en&answer=8933 (Check out the 'Automatically added contacts' section)

For each of these contacts, if you reply with a message like "Email receipt confirmed," then it will automatically add the email address into your contacts. They will appear in the "Other contacts" section of the left-hand navigation.

An even more automated way to reply is to create a filter that will look for emails coming into the inbox and auto-respond with a "Canned Response" More about doing that here. If you were set up this filter to send a canned response, presumably all of the appropriate messages will be replied to with a Canned Response like "Email has been added to contacts" (Canned responses are written by you)

Lastly. if you need a quick and easy way of recording all the students email addresses without using Gmail to capture it all, you can set up a Google Form. This will allow you to set up a quick webform that asks users to enter their preferred email address. All answers will be stored in a Google Spreadsheet that you can then use to summarize the data.


you could use the Context.IO webhooks to get an HTTP request sent to a script you specify when your Gmail account gets an email to our special address.

In that you can confirm the code in the subject, fetch the body then push it to Google using one of their APIs.

Docs can be found here: context.io/docs/2.0/accounts/webhooks

Let me know if you need any help getting set up, I'm the Founder.

  • Good to see that you have read the faq. – Jacob Jan Tuinstra Dec 18 '12 at 5:26
  • 1
    The answer is actionable and directly on topic. It provides an actual solution which involves coding on his side, usage of Google APIs and usage of ContextIO (to which I disclosed affiliation). It was meant to be helpful and his usage would even fit within our free quota. – Bruno Morency Dec 18 '12 at 14:01
  • It was meant as such +1. – Jacob Jan Tuinstra Dec 18 '12 at 14:04
  • Ha! It seems my sarcasm detector needs to be adjusted down a notch or two :) thanks – Bruno Morency Dec 18 '12 at 23:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.