Email Calculator

Discussion in 'Mac Programming' started by dergaderg, Dec 27, 2011.

  1. macrumors member

    Joined:
    Feb 9, 2009
    #1
    Today I whipped up a little program using java. if you send an email to "EmailCalculator@gmail.com" with "Calc 4times5" , "Calc 4over5", "Calc 4plus6" , "Calc 4minus6" , "Antipow 4x^5" , or "Pow 4x^7" in the subject line, it will send you back an answer in ~11 seconds ( just so i can leave it on and its not pinging the server to much).

    Do any of you have any suggestions for adding functionality? im currently working on a weather service
     
  2. macrumors Core

    miles01110

    Joined:
    Jul 24, 2006
    Location:
    The Ivory Tower (I'm not coming down)
    #2
    Maybe this is a stupid question, but why would anyone want to wait 11 seconds for the answer to a simple calculation? It takes less time to put that into a Google search and get the answer in fractions of a second.
     
  3. thread starter macrumors member

    Joined:
    Feb 9, 2009
    #3
    Well that was just an example

    That was just something i set up to have the interface for sending an email to a computer and it processing what you sent it and having that processed data sent back, without any intervention.

    I just added a Weather Function, Send the same email "Weather" then you zipcode in the email then it will send you the current temp and the forecast.
     
  4. macrumors regular

    Joined:
    Aug 21, 2011
    Location:
    Stockholm Sweden
    #4
    Invitation to SPAM?

    Hmm,
    you might be the nicest person in the world, but ...

    ... but this could also be an invitation to collect mail adresses for later SPAM sendings.

    // Gunnar
     
  5. macrumors 6502a

    Joined:
    Jan 23, 2009
    #5
    Just use your junk email address.
     
  6. macrumors 603

    Joined:
    Aug 9, 2009
    #6
    Why email? Considering the possible abuses, why not something simpler, like HTTP? It's still a server, and requests can be easily formed from text, like:
    http://example.com/weather?90210
     
  7. macrumors 603

    notjustjay

    Joined:
    Sep 19, 2003
    Location:
    Canada, eh?
    #7
    No need to be rude, guys. It's obviously a learning example and thought it may not be the most practical way to calculate things, it's a neat interface with lots of potential. I've always thought it would be cool if my house could respond to emails and tell me things like whether I left the garage door open (or maybe respond to a command to close it) or tell me what the thermostat's set to.

    If you're afraid of spam then use your throwaway email address. If you don't have one... you ought to :)
     
  8. macrumors 68000

    maril1111

    Joined:
    Mar 14, 2010
    Location:
    Denmark
    #8
    Fair enough I may have been a bit rude... and i like the idea with the house responding to things like that, heck imagine cars and bikes could do that to :) although there is always the danger that the more electronics there are in a certain thing the higher the likeliness that something will go wrong.

    Back to the post, I do think that do the http model chown says isn't a bad idea and i would like the o.p to follow it if possible, than i bet more people would try it out.
     
  9. macrumors 603

    Joined:
    Aug 9, 2009
    #9
    These days, houses and garages have websites. Seriously. Home automation interfaces or gateways, at least some of them, use HTTP and/or HTTPS.

    Email only makes sense when an email client is all you have. For example, early cell phones may have had passable email but very limited web browsing capabilities. So email would be a better interface choice in those cases. However, as soon as mobile browsers began to not suck, email doesn't look so good any more. HTTP gives you many more interaction options than email, and can be used from any device, not just the one configured with your email account info.
     
  10. thread starter macrumors member

    Joined:
    Feb 9, 2009
    #10
    I like this idea



    This sounds interesting, but I do not know how to set an http server up. do you know of any tutorials for doing so?
     
  11. macrumors G5

    Consultant

    Joined:
    Jun 27, 2007
    #11
    So basically you are making a http://www.wolframalpha.com copy,
    except that what you offer takes longer and collects email address
     
  12. thread starter macrumors member

    Joined:
    Feb 9, 2009
    #12
  13. macrumors 6502a

    GorillaPaws

    Joined:
    Oct 26, 2003
    Location:
    Richmond, VA
    #13
    I think it would be more fun to duplicate Woz's dial-a-joke phone service via e-mail.
     
  14. thread starter macrumors member

    Joined:
    Feb 9, 2009
    #14
    Dial a pun

    I couldn't find a text file full of jokes but i did find one for puns.

    http://mdergosits.no-ip.info/pun
     

Share This Page