Solved

Trigger ASP script from received Email

Posted on 2011-09-26
6
425 Views
Last Modified: 2012-06-27
I'm sure this has been asked and answered many times, but I am not finding the solution, so here it goes.

I have a dedicated email that will receive alert notifications.  Subject 'Field Event', and then the body containing whatever the message is.  may or may not have a closing salutation.

I would like this email to generate a trigger to call an ASP Page and populate a page, or database entry, with the contents of the email sent.  

is this possible, and can someone give me some tips on how to achieve this?  And a note, the email is a gmail account, so I can not get direct access to it.  Thoughs or ideas are GREATLY appreciated.
0
Comment
Question by:mopar003
  • 3
  • 2
6 Comments
 
LVL 18

Expert Comment

by:mgfranz
ID: 36711600
Should be simple, how is the email generated?  Is it sent using CDO?  Is it generated via a script?

What I am saying, is that if the email is generated and sent via a script, you can simply call a function after the email is created that does your database or page work.  Psuedocode;

Call email script
    Generate email contents
    Create Object to send email
    Send email
    Close email Object

Call Database script function
    Populate database with contents
    Create page with contents of email
End
0
 
LVL 1

Author Comment

by:mopar003
ID: 36711832
No, the email will be sent by someone else, TO my account.  When that email is received, I want it to trigger a script.
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 36712447
What email client are you using?  Or are you running Exchange?
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 1

Author Comment

by:mopar003
ID: 36712488
Currently the server is just a web hosting server, and the email address that is being sent to is a gmail account.  I can set up Exchange or Outlook Express even to handle the incoming emails.  
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 36712581
Check with your hosting company to see if they put received email messages into a folder before getting picked up by you the client.  If so, you can read the message header to see if the Subject matches to run your script using a number of techniques.  If the hosting service is running Exchange, you could try something like this, http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/e2582e4f-d5ce-49bd-a2e5-9fd0bd412d84/

As far as I know, Gmail does not allow triggers from a client account, they will forward messages though.
0
 
LVL 28

Accepted Solution

by:
sybe earned 500 total points
ID: 36716307
An email itself does nothing. Many people send me emails and until someone (me) actually opens them, nothing happens. It just sits and waits.

You need a machine to read the emails (if you are not going to do it yourself). Write a scripts that uses the gmail API (http://code.google.com/apis/gmail/) to check for new messages.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Pegasus Mail (http://www.pmail.com/) is a donation ware that is a collaboration of David Harris along with his team members. It is a desktop mail client that offers the option of configuring more than one mail account with single set up. It supports…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
The purpose of this video is to demonstrate how to use PicMonkey software to customize images for a Mailchimp campaign. Picmonkey is free and simple online software which can be used by users who don’t have robust editing software such as Photoshop,…
This Micro Tutorial will demonstrate the easy use of Gmail embedding images in your email so the recipient of your email can view them in context.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question