• 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

sending emails from servlet

 
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI ,
I'm trying to send an email from servlet using sun.net.smtp.SmtpClient class..
I'm using PostCast server(SMTP server) running on my computer ,The settings are
host name: nasir
server port : 25
Since SmtpClient api is not available I don't know what to put in the constructor.I tried with following but none is working
SmtpClient sc=new SmptClient("nasir:25");
SmtpClient sc=new SmptClient("nasir:2025");
SmtpClient sc=new SmptClient("nasir 2025");
Please help me....
[This message has been edited by Nasir Khan (edited March 14, 2001).]
 
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The constructor for the class is just SmtpClient(String host). It looks like your host name is wrong. Try putting in your IP address instead.
 
Nasir Khan
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Angela,
I tried these
SmtpClient sc=new SmptClient("127.0.0.1:2025");
SmtpClient sc=new SmptClient("http://127.0.0.1:2025");
but still can't make it....
 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try passing an empty String to the constructor. The localhost should redirect your email automatically.
reply
    Bookmark Topic Watch Topic
  • New Topic