Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Creating email template  RSS feed

 
Chris Ernst
Ranch Hand
Posts: 37
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello folks,

I want to create an exception reporter which sends formatted mails to a collecting point. This template have to open an MS Outlook email as well,
where the receiver, subject and a special text is set and the user only have to click send. So is it possible that I can create from JSF an email object
with the information from a custom bean?

cheers

Chris
 
Tim Holloway
Bartender
Posts: 18704
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can create and send an email using the JavaMail API. You can use JSF to collect information that goes into the email, but JSF does not have any email capabilities itself.
 
Chris Ernst
Ranch Hand
Posts: 37
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
damn, this API is what I not wanted, but thank you Tim.

Then I'll try to find an other method to report exceptions parallel to the log files...

 
Tim Holloway
Bartender
Posts: 18704
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Log4j has an option for sending exceptions as emails. No user programming (almost) required.
 
Chris Ernst
Ranch Hand
Posts: 37
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't want to save any email data in my application...
What I want to do is, that a user how got a problem or an error that he can send an email to helpdesk
with the workstation number, name of the app and maybe the exception. So here is important, that the
email comes from the user as himself and not from a support mail or my email...

I'll check the logfiles and take a look if I can solved it with JMS/ActiveMQ or I write an other message
service :) I'am a bit lazy on this and its a test. If its work I'll used it as a standart customer service.
 
Tim Holloway
Bartender
Posts: 18704
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know that I'd want to do that. Users lie.

The log4j email logger sends the stack trace. I'm not sure how easy it would be to include the user's ID. It has been a while since I set one up.
 
Chris Ernst
Ranch Hand
Posts: 37
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes confirm users lies :)
It wan't me

I have it actually in my logging, that i print out the workstation number (I have to used as well in my application)
so i only have to create a custom logging info with the data what i need...

the I have to check what email adress I can use for it

Thanks Tim
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!