Help coderanch get a
new server
by contributing to the fundraiser
  • 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

smtp server error in javamail

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
I'm working on Win98 and I tried to run the MailExample.java given in JavaMail tutorial at java.sun.com. In this example it sets up the mail server as follows:
<CODE>

Properties props=System.getProperties();
props.put("mail.smtp.host", "SMTP.Server");

</CODE>
The program compiles, but when I try to run the program I get the following error
Unknown SMTP host : SMTP.Server
Does this program require an SMTP server. If so, can I get it for win98. I tried to search for the server, but I get different softwares which work just like Outlook Express. It would be very heplful if someone tells me a particular site from where I can download a free SMTP server for win98.
 
Rancher
Posts: 1449
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I don't know much about Windows. I'm really a Unix guy, I just have have an NT box on my desk. Regarding SMTP, it is pretty standard to have on Unix boxes but I'm not sure it would be on Windows.
Have you done a web search to try and track down SMTP servers for Windows? There may be some out there.
John
 
Parag Mokal
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi John,
Thank you for your reply. But I would like to ask you about Unix. I will try getting unix. Can you give me some links which describe unix installation and tutorials on it.
 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got a mail server from www.freeware.com called first class mail server which runs on all windows machines. search for mail server and it comes up.
it is really good for a cut down free version. create a new domain called mail.host in the app and in your prog put in.
properties.put( "mail.host" , "mail.host" ) ;
took me ages to work out that you needed a mail server. got lucky with first class mai server which is simple to run.
 
John Wetherbie
Rancher
Posts: 1449
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Unix runs on Unix boxes like those from Sun, HP, etc. If you have a Windows box you can get a Solaris (Sun's Unix) version for it for $80 US or you can install Linux.
As David mentioned there is at least one free mail server you can use for Windows and I'm sure there are others if you search the web for them.
Good luck!
John
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear David,
Is it first class mail server. Or first Up mail server
Regards,
Anup
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi David/Guys,
I have done exactly what david has said previuosly. Compilation of MailExample.java was fine. But when I try to run it says:
Exception in thread "main" java.lang.NoClassDefFoundError: MailExample
the command that i gave was :
prompt>java MailExample mail.host pbvs@hotmail.com pbvs@hotmail.com
Please let me know if sthing's wrong.
Thanks.
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Paraq,
I ran into the same problem when I tried to run a similar program. I checked the headers of my own emails (using outlook express with windows98), and found the server to be "smtp.email.msn.com". This should be the same for you if you (the client) are using msn.com for hosting...
Aaron Briel
 
What could go wrong in a swell place like "The Evil Eye"? Or with this tiny ad?
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic