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 ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Problem in sending mail using Servlets

Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We are encountring a problem while using class.
For a given emailid ,the exception thrown is ,it is not able to relay on that id.
we're using SmtpClient s=new SmtpClient("");
actually,what this constructor implies? and why we are passing string argument to constructor.Whether it have any importance or not
Please send a solution for this
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where is this email package you are using coming from?
Taking a guess at your question the constructor looks like it wants a SMTP host. The issue with this can be one of many things but, usually it is one of these two. First the arguement is not even a SMTP host for you to use or second some SMTP hosts will only allow email to be sent from registered users.
eg: I work on JSP Insider. I can send email using my reply address as . I cannot send email with the reply address . This is because the JSP Insider SMTP server will refuse to send mail from unknown senders(
Your error is more then likely one of those two things. SMTP servers are the bane of email bliss. I would recommend you either set up your own or ask the server's administration what the deal is.
On a side note. Have you looked in to the JavaMail API? You will find much more support for this package including tag libraries and FAQs.
Jayson Falkner
V.P./CTO, Amberjack Software LLC

[This message has been edited by Jayson Falkner (edited May 08, 2001).]
I hired a bunch of ninjas. The fridge is empty, but I can't find them to tell them the mission.
We need your help - Coderanch server fundraiser
    Bookmark Topic Watch Topic
  • New Topic