----- Original Message -----
From: "Gregor Schneider" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Tuesday, August 12, 2008 4:07 PM
Subject: Problems using JavaMail-API within Tomcat
Hi guys,
recently our server crashed (Debian), and since then I'm having
problems getting JavaMail to run within Tomcat 5.5
I've defined a ressource within $catalina_home/context.xml:
<Resource name="mail/Session" auth="Container"
type="javax.mail.Session"
mail.smtp.host="myserver.com"/>
The above named server is listed in my /etc/hosts
I can ping myserver.com
However, I get an exception saying
javax.servlet.ServletException: 501 Syntax: HELO hostname
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
org.apache.jsp.FormMailerDE_jsp._jspService(FormMailerDE_jsp.java:169)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
Greg I've never had to do this on my systems... but I've noticed that if the
DNS gives crap, or the machine has a problem finding its own host name,
JavaMail goes beserk... apparently there is a property to set if a machine
cant find itself...
mail.smtp.localhost
note.... not
mail.smtp.host
which is the normal smtp one...
So that will probably fix it, but maybe the real thing to do is find out why
that machine doesnt know who it is ;)
Then also if you testing.... remember to put the host name in that the mail
SP expects... otherwise the other thing that happens is they reject you as
some foreign SPAM... ;)
its HELO (blank) because when java asks the machine who it is... it doesnt
know ;)
... I think
---------------------------------------------------------------------------
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---------------------------------------------------------------------------
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]