tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "vishwam" <>
Subject Re: unable to send a java mail
Date Thu, 28 Apr 2005 13:29:04 GMT
my smtp server requires authentication with username & password

but i couldn't find these smtp authentication fields in java mail
my email program is like this

public class MailServlet extends HttpServlet {

  static final String FROM = "";
  static final String TO = "";

  public void doGet(HttpServletRequest req, HttpServletResponse res)
                               throws ServletException, IOException {
    PrintWriter out = res.getWriter();

    ParameterParser parser = new ParameterParser(req);
    String from = parser.getStringParameter("from", FROM);
    String to = parser.getStringParameter("to", TO);

    try {
      SmtpClient smtp = new SmtpClient("xxxxxx");  // smtphost name
      PrintStream msg = smtp.startMessage();

      msg.println("To: " + to);  // so mailers will display the To: address
      msg.println("Subject: Customer feedback");

      Enumeration enum1 = req.getParameterNames();
      while (enum1.hasMoreElements()) {
        String name = (String)enum1.nextElement();
        if (name.equals("to") || name.equals("from")) continue;  // Skip
        String value = parser.getStringParameter(name, null);
        msg.println(name + " = " + value);

      msg.println("Sent by " + HttpUtils.getRequestURL(req));

----- Original Message -----
From: "Dale, Matt" <>
To: "Tomcat Users List" <>
Sent: Thursday, April 28, 2005 6:49 PM
Subject: RE: unable to send a java mail

The problem appears to be with your SMTP server and not java. Looks like you
might need to open it up a bit to relaying.


-----Original Message-----
From: vishwam []
Sent: 28 April 2005 14:18
To: Tomcat Users List
Subject: unable to send a java mail

iam trying to send a simple email using javamailAPI
but iam getting the following error 553 Sorry, that domain isn't in my list
of allowed rcpthosts.

 at Source)
 at Source)

Iam trying for last 4 days
,but i couldn't solve this problem

it is important ,bcos iam using it in my project
i'll be grateful to someone who solves this problem


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message