• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Creating email template

 
Ranch Hand
Posts: 57
Netbeans IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 57
Netbeans IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Log4j has an option for sending exceptions as emails. No user programming (almost) required.
 
Chris Ernst
Ranch Hand
Posts: 57
Netbeans IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 57
Netbeans IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
If you want to look young and thin, hang around old, fat people. Or this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic