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

java mail..plz help

 
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
hi all,
im trying to send mail using the SendMailServlet which come up with the tomcat 4.0.. But the servlet is throwing the exception
ENCOUNTERED EXCEPTION: javax.naming.NameNotFoundException: Name java:comp is not bound in this Context
I have kept the jar files in the /lib directory..i think some changes are necessary in the server.xml file..
can any1 tell me the real problem ??
thanks
Raj
 
Rajeev Ravindran
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
sorry i forgot to add this in the above post..i have set the value of mail.smtp.host in server.xml file.. shld i make any other changes to make the SendMailServlet working ???
Thankx
Raj
 
Rajeev Ravindran
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
me again,
i solved it...congrats to me..LOL..but one more prob, right now the email address of the sender is displayed on the From field of mail box of the receiver.. is it possible to set it to some name.. am i making confusion.. In short, I just want to change the display name..is it possible thru java mail api ?? how ???
thanx in advance
Raj
SCJP2
 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Raj,
How did you solve your problem? I doubt mine is similiar but I am receiving a error upon instantiating the SendMailServlet class...
java.lang.NoClassDefFoundError: javax/mail/MessagingException
Any ideas?
 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hi

I come across the same problem,someone know how to solve it?
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
darren:

ensure that mail.jar and activation.jar are in CATALINA_HOME/common/lib
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Raj:

Message.setFrom() accepts an Address. JavaMail accepts any properly formatted email address. The address spec (in case anyone wanted to know) is RFC 822.

That means, you can send in "john smith <john.smith@foo.com>" and if your email client is configured to do so, it will display only "John Smith". There's no particular way to "force" a client to show parts or the whole email address though.

http://www.freesoft.org/CIE/RFC/822/55.htm
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Okaaaay.

And I've just read the dates on those other posts.

Iyo, we'll continue this in your other thread
 
moose poop looks like football shaped elk poop. About the size of this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
    Bookmark Topic Watch Topic
  • New Topic