• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

Help me please, JavaMail  RSS feed

 
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys.
I have wrote a simple Java class to send an email to "johntodd@lycos.com"
address from the "johntodd@linuxmail.org" adress.

but I have got the following exceptions :
MessagingException : could not connect to SMTP host mail.lycos.com, port 25
nested exception is : SocketException : Network is unreachable
so, is mail.smtp.host property refers to the reciever host or to sender host ??
is every smtp mail server has the following format : mail.smtp.host
like : mail.smtp.yahoo or mail.yahoo.com ??
please, I need help, because JavaMail is a vital subject me....
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SMTP name is for the Send Mail Transport Protocol** -- It's the name of a host that will send your message. Take a peek in your regular email program options and you'll probably see the info you need to plug. If that doesn't help perhaps you could discuss with a network admin or whoever set up your email for the correct SMTP (aka SendMail) address.
PKNH
** exact acronym I'm not sure -- could be Send Mail Transport Program but you get the idea. PKNH
 
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi John:
I just have a question for you. Why are you using Session.getDefaultInstance() method as oppose to Session.getInstance(). When you use getDefualtInstance it return a Session object that is shared among all application running in the same JVM. Isn't a security hole? for example, if another application reset the security parameters on the defualt Session instance, then your application will not be able to access it anymore.
I am not criticising your choice, I just want to know why?
thanks
 
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


SMTP name is for the Send Mail Transport Protocol
...
exact acronym I'm not sure -- could be Send Mail Transport Program but you get the idea. PKNH


*Ahem* - its actually Simple Mail Transfer Protocol (See RFC 821 which defines it). I could also point out its not an acronym, but I might get thrown out of the forum for being far too smug...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!