• 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

How to send mail from jsf, can anybody tell me the a-z guide for this

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wanted to use my gmail id as sender mail id to send mail to user who-ever visits on my website, how to do it.
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Probably the best way is to use JavaMail. If I'm not mistaken it's built into Java EE containers, such as the one you're using to contain your JSF code. Here's a link to the JavaMail FAQ, which specifically describes how to connect to Gmail.
 
Greenhorn
Posts: 27
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi dude,

you can use below function for sending mail using JSF.

public String sendEmail(){
MailUtility mail=new MailUtility();
mail.sendMail("Subject", "Hi this is test mail", "sreekanthreddy.com@gmail.com");



return "success";
}
 
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

MailUtility is some in-house helper class someone has written? You both work for the same
company?
 
sreekanth aleddulla
Greenhorn
Posts: 27
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
no boss i am not i am working for tcs
it will work fine see the code if you want i will send you the Mailutility class
 
Brendan Healey
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

It's just that I type MailUtility into NetBeans and nothing is coming up so it seems to not
be a standard package - so it's not going to be much help to anyone unless you can
provide further information about what it is, where to get it etc...

I've got e-mail sending working fine from with a Glassfish app server hooked into a
google mail account so I don't need any help myself.

Regards,
Brendan.
 
sreekanth aleddulla
Greenhorn
Posts: 27
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK boss
if you need any help in jsf just reply me i will help you
 
sreekanth aleddulla
Greenhorn
Posts: 27
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK great boss
i need detailed richfaces notes could you please help me in this
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am getting an error that..
Unknown smtp host ..when I am passing it the
smtp.gmail.com
 
Vineet kumar Gupta
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not in this way...
Write the full code and step step by step ...
 
Saloon Keeper
Posts: 27762
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
https://coderanch.com/how-to/java/NotACodeMill
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic