| Author |
Update Fields via email response
|
rahull agarwal
Ranch Hand
Joined: Dec 20, 2010
Posts: 31
|
|
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
Joined: Oct 27, 2005
Posts: 19216
|
|
|
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.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
rahull agarwal
Ranch Hand
Joined: Dec 20, 2010
Posts: 31
|
|
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
Bartender
Joined: Oct 14, 2005
Posts: 16483
|
|
|
Elaborate? What part of it did you not understand?
|
 |
rahull agarwal
Ranch Hand
Joined: Dec 20, 2010
Posts: 31
|
|
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
Bartender
Joined: Oct 14, 2005
Posts: 16483
|
|
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
Joined: Dec 20, 2010
Posts: 31
|
|
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
Joined: Jan 10, 2002
Posts: 56185
|
|
|
What do you think JavaMail does?
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
rahull agarwal
Ranch Hand
Joined: Dec 20, 2010
Posts: 31
|
|
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
Joined: Dec 20, 2010
Posts: 31
|
|
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
Bartender
Joined: Oct 14, 2005
Posts: 16483
|
|
|
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.
|
 |
 |
|
|
subject: Update Fields via email response
|
|
|