• Post Reply Bookmark Topic Watch Topic
  • New Topic

email and web application  RSS feed

 
David Spades
Ranch Hand
Posts: 348
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there anyway to make gmail to send some sort of notification when a new email comes? even better if gmail can send the mail content to a certain web url, so no need to poll the gmail. if gmail doesn't have this feature, any email provider that can? thanks
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does it mean to "send the mail content to a certain web url"? SMTP is not HTTP.
 
David Spades
Ranch Hand
Posts: 348
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I know SMTP is not HTTP, but is there a way to trigger HTTP call from SMTP? so basically what I want is for my app to be aware (for processing) each time a new mail arives.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SMTP has no such provisions. The usual approach is to have the web app poll the mail server at fixed intervals (every N minutes or so).
 
David Spades
Ranch Hand
Posts: 348
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see. So, is it better to use javamail or gmail api? thanks
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not familiar with the Gmail API, so can't really comment on that. Obviously, using JavaMail would make it independent of any particular mail provider, so I'd think that would be preferable, especially if it can do everything you need done.
 
Paul Clapham
Sheriff
Posts: 22524
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I didn't know there was a Gmail API, but after a bit of web searching I see it's a new API which was just released a few months ago.

Anyway, reading through the one-page summary it looks like you'd still have to poll every N seconds to find out about new mail -- I don't see anything whereby you can install a notifier on Google's servers. (Which I think would be an unlikely thing for a mail server to offer anyway.)
 
David Spades
Ranch Hand
Posts: 348
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if we're supposed to poll anyway, what's the purpose of listeners in javamail? no luck googling for quality tutorial / example. thanks
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The listeners let you structure mail handling code better - there could be many pieces of code that need to know about these events; using listeners, they can be notified automatically, instead of you having to write dispatch code to do so.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!