File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Update Fields via email response

 
rahull agarwal
Ranch Hand
Posts: 31
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a web application running on JBoss.

When an entity is created in the system, the system sends out an email to the approver.

Currently, the approver has to login to the system and approve/reject it.

Is it possible that the approver replies to the email with words "approve" or "reject" and system changes the status of this entity?

Any pointers will be highly appreciated.

Thanks..
 
Rob Spoor
Sheriff
Pie
Posts: 20372
44
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure. Just send the email from an existing email account. The replies go into this account, after which you can read them through JavaMail. You can then investigate the emails subject and body and do whatever you need to based on their contents.
 
rahull agarwal
Ranch Hand
Posts: 31
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Spoor wrote:Sure. Just send the email from an existing email account. The replies go into this account, after which you can read them through JavaMail. You can then investigate the emails subject and body and do whatever you need to based on their contents.


Thanks so much.

Will you be able to elaborate this?
 
Paul Clapham
Sheriff
Pie
Posts: 20177
25
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Elaborate? What part of it did you not understand?
 
rahull agarwal
Ranch Hand
Posts: 31
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:Elaborate? What part of it did you not understand?


Say my application is www.myApplication12378.com

It sends an email from support@myApplication12378.com

User replies to this email.

How will JavaMail know that email was sent? The mail will go out to SMTP server. right?
 
Paul Clapham
Sheriff
Pie
Posts: 20177
25
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
rahull agarwal wrote:
Paul Clapham wrote:Elaborate? What part of it did you not understand?


Say my application is www.myApplication12378.com

It sends an email from support@myApplication12378.com

User replies to this email.

How will JavaMail know that email was sent? The mail will go out to SMTP server. right?


The user's reply comes into your e-mail server. Not your SMTP server of course, because SMTP is for sending e-mail. But it will come into your e-mail server, whatever it is. Then you can use JavaMail to search your e-mail server via IMAP or POP3, whichever it supports.
 
rahull agarwal
Ranch Hand
Posts: 31
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:
rahull agarwal wrote:
Paul Clapham wrote:Elaborate? What part of it did you not understand?


Say my application is www.myApplication12378.com

It sends an email from support@myApplication12378.com

User replies to this email.

How will JavaMail know that email was sent? The mail will go out to SMTP server. right?


The user's reply comes into your e-mail server. Not your SMTP server of course, because SMTP is for sending e-mail. But it will come into your e-mail server, whatever it is. Then you can use JavaMail to search your e-mail server via IMAP or POP3, whichever it supports.


You all have helped me a lot. let me research further.

But a quick note.. So, Javamail can actually go into exchange server and search/read emails? Really?

thanks so much.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64182
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you think JavaMail does?
 
rahull agarwal
Ranch Hand
Posts: 31
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:What do you think JavaMail does?


I should rather go and research myself.. It looks like I am looking for "spoon feeding" here :-)

I will get back with any questions if I have.

Thanks everyone
 
rahull agarwal
Ranch Hand
Posts: 31
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It all makes sense now.. I looked into JavaMail API and it all seems to easy and smooth now..

Thanks everyone. I am marking this post as resolved.
 
Paul Clapham
Sheriff
Pie
Posts: 20177
25
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Great! Just one suggestion: the JavaMail download includes a directory of sample programs. I recommend you have a look at those, and then when you are ready to start coding, use them as a basis for your own code. There's (all right, TWO suggestions) also a JavaMail FAQ which you should be able to google up pretty quickly. Lots of useful information there.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic