My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

Can an E-mail be used to trigger scripts ....?

Lila Fowler's photo
Lila Fowler
·Dec 29, 2018

Okay, this may sound crazy. I'm trying to figure a way to use my desktop mail client (like Thunderbird -----EDIT: After the responses received, I realise this is totally unreliable; I meant as long as my inbox (no matter how I access the inbox) gets the email ------) to 'trigger' a cronjob script. Is this possible at all?

To elaborate, let me describe why (hypothetically):

  1. I have 1 million users on a 'gaming' website
  2. Each time any user reaches a high score (let's say 1000) for any game, they can redeem the points and buy stuff with it.
  3. They first need to 'redeem' the points, which they'll be charged $0.10 for, so they'll click on the redeem button
  4. They'll be taken to a payment gateway to send the 10 cents, and that will simultaneously trigger an email which will be sent to my inbox (if the payment was successful). If the payment failed then the email will not come to me.
  5. Instead of sitting at my desktop 24/7, I want the email to be the trigger, so that the points can be sent to their profile (on my website) instantly and automatically.

I was thinking of using cronjobs with the email as a trigger, but I have no idea how that could work. Do I configure my email? The cronjobs? I'll be using cPanel via windows to do everything, so I guess it's not too customizable...I really wish this could work out somehow.

Is this possible or is it crazy?