Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2003
    Posts
    176

    Unanswered: Can a job trigger itself upon receipt of an email?

    Hi all,

    I have a SQL Server Job that I would like to run when I receive an email saying "Data is now ready to be imported to SQL Server" ?

    Is there a way to accomplish this.

    - Vivek

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    got a mapi compliant mail server laying around. you might be able to do this with sqlmail.

    OR

    i have never written too much VBA for outlook (mostly access and excel) but you maybe able to write a rule that drops this email in a certain folder. Then, and I am not sure if there is an event for new mail but there probably is, you can probably make a db call in that event. you would have to leave your mail client open and your computer on.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    Dec 2002
    Posts
    1,245
    Check out xp_readmail in SQL BOL. Basically, you would need to put this inside a SQL Job that executes periodically and then use xp_readmail to "answer" the inbox and trigger your job.

    Having said all that, I will say that SQL mail only ever caused me grief and heartache. Go Database Mail (SQL 2004)!

    Regards,

    hmscott
    Have you hugged your backup today?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •