Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a website with a contact form.

Once the user fills in the form, an email is being sent to my gmail in the following syntax:

From: Contact us form <>


Message body:

  • Name: username filled in form
  • Email:
  • Message: Hi, how are you?

I'm looking for a way to extract all the Emails that were filled in the form.. since the email from address is my own one and not the form filler one, I can't see their email address in my contacts tab.

Anyone has any idea how to do this?

share|improve this question
If you are looking for something simple to accomplish this without having to write some sort of code, how about switching to using a Form via Google Docs. The output gets stored in a spreadsheet. – mindless.panda Jun 26 '11 at 14:24
So on which operating system do you want to do this? Do you have access to Gmail via POP/IMAP? Are you on a graphical user interface? Does this need to happen automatically or are you looking for a one-time solution? – slhck Jun 26 '11 at 14:26
So what user87633 is looking for it a way to automate pulling out a portion of the message body. It could be that the question should be reworked and moved to Stack Overflow. – Kirk Jun 26 '11 at 19:59

In this article there is a discussion about using a + sign in your gmail address to help prefilter mail. So if you have the ability, you can change your contact for email address to something along the lines of The mail will still be delivered to but you can filter on messages sent to So you can forward them off, or label them a certain way, or whatever else you might need.

share|improve this answer
I can filter out the messages I get from users who filled in the web form as they all have the same subject line. What I need though is to extract the emails the users filled in in the web form. – user87633 Jun 26 '11 at 13:58
What do you mean by extract the emails? That could mean a bunch of things in my mind. Can you be more specific about what you are trying to accomplish? – Kirk Jun 26 '11 at 14:00
Yes. Each email sent out from the web form includes the message that the user filled in and his Email address. It's in the message body and I am looking for an automatic way to go through all the relevant emails and extract only the Email addresses and save them to a text/csv file. Am I making sense? – user87633 Jun 26 '11 at 14:02
That does make sense. I used to do this in python ... the gist of the process was (and it has been ages) receive the e-mail via POP, get the body of the message, and pull out the attachments. Off hand I do not remember what the python module was I was using, but it did work very very well. – Kirk Jun 26 '11 at 14:14

Gmail provides IMAP access to their accounts.

This means, you could relatively easily have someone write a small script or application that connects to the IMAP server and downloads the contents of the mails in question. There are plenty of modules available for accessing IMAP in different programming languages, for instance:

If you wish to do it manually, you could use most standard mail clients, and add the IMAP server to it. Then you could do a search for the subject line, and export those emails in an appropriate format.

An example of such a client is Thunderbird, where you could use SmartSave to export the emails, for instance.

share|improve this answer
And Exchange access, if for some reason you wanted to do Outlook rules. – Rich Homolka Jun 26 '11 at 16:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .