You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by John Corrigan <jo...@johncorrigan.net> on 2003/05/20 20:57:07 UTC
Sending e-mail from a servlet
System:
Win2K
Java 1.4.1-rc1
Tomcat 1.4.18 (NOT LE)
Problem:
Attempting to send e-mail yields the following exception:
ENCOUNTERED EXCEPTION: javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.MessagingException: IOException while sending message; nested exception is: javax.activation.UnsupportedDataTypeException: no object DCH for MIME type text/plain
javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.MessagingException: IOException while sending message;
nested exception is:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type text/plain
...
I've tried extracting the contents of mail.jar to the WEB-INF/classes directory (as was suggested in some usenet postings) and that doesn't seem to help. Both mail.jar and activation.jar are in .../Tomcat-4.1/common/lib.
Any ideas?
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Sending e-mail from a servlet
Posted by "Ivan F. Martinez" <bl...@ivanfm.com>.
On Tue, 20 May 2003 11:57:07 -0700
"John Corrigan" <jo...@johncorrigan.net> wrote:
JC> System:
JC> Win2K
JC> Java 1.4.1-rc1
JC> Tomcat 1.4.18 (NOT LE)
JC>
JC> Problem:
JC> Attempting to send e-mail yields the following exception:
JC>
JC> ENCOUNTERED EXCEPTION: javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.MessagingException: IOException while sending message; nested exception is: javax.activation.UnsupportedDataTypeException: no object DCH for MIME type text/plain
JC>
JC> javax.mail.SendFailedException: Sending failed;
JC> nested exception is:
JC> javax.mail.MessagingException: IOException while sending message;
JC> nested exception is:
JC> javax.activation.UnsupportedDataTypeException: no object DCH for MIME type text/plain
JC> ...
JC>
JC>
JC>
JC> I've tried extracting the contents of mail.jar to the WEB-INF/classes directory (as was suggested in some usenet postings) and that doesn't seem to help. Both mail.jar and activation.jar are in .../Tomcat-4.1/common/lib.
JC>
JC> Any ideas?
Running with security Manager ????
Try this in yout policy... (make the changes for you paths).
I don't know why in one other machine with the same config it's not necessary, but solved this problem for me.
---------------------
// http://java.sun.com/products/javamail/FAQ.html#securityManager
grant {
permission java.io.FilePermission "/opt/jakarta-tomcat-4.1.24/common/lib/mail.jar", "read";
permission java.io.FilePermission "/opt/jakarta-tomcat-4.1.24/common/lib/activation.jar", "read";
};
----------------------
--
Ivan F. Martinez
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
RE: Sending e-mail from a servlet
Posted by John Corrigan <jo...@johncorrigan.net>.
I think the problem may have had something to do with more than one JVM
being installed on the machines having trouble. After removing Tomcat and
all JVMs and then reinstalling just the latest JVM and Tomcat all seems to
be well.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
RE: Sending e-mail from a servlet
Posted by John Corrigan <jo...@johncorrigan.net>.
Yes.
A different exception is thrown if that hasn't been done :)
-----Original Message-----
From: Sasha Borodin [mailto:sasha@whoissasha.com]
Sent: Tuesday, May 20, 2003 1:44 PM
To: Tomcat Users List
Subject: Re: Sending e-mail from a servlet
Sorry if I haven't followed this thread closely enough, but have you changed
the host to an actual SMPT server in server.xml?
<Resource name="mail/Session" auth="Container"
type="javax.mail.Session"/>
<ResourceParams name="mail/Session">
<parameter>
<name>mail.smtp.host</name> <--- HERE
<value>localhost</value>
</parameter>
</ResourceParams>
-Sasha
On 5/20/03 15:20, "Micael" <ca...@harbornet.com> wrote:
> Jah, the code is wrong. I had to rewrite it. I cannot remember now what
> was wrong. But it is pretty easy to find. Micael
>
> At 12:13 PM 5/20/03 -0700, you wrote:
>> SendMailServlet is not working in my installations :) The snippet of the
>> stack trace is from /examples/jsp/mail/sendmail.jsp...
>>
>> -----Original Message-----
>> From: Kevin Baynes [mailto:kbaynes@seagullsw.com]
>> Sent: Tuesday, May 20, 2003 12:08 PM
>> To: Tomcat Users List
>> Subject: RE: Sending e-mail from a servlet
>>
>>
>>
>> In the Tomcat examples included with the regular distribution, there is a
>> SendMailServlet at /examples/WEB-INF/classes/SendMailServlet.java that
>> works. Also, look at /examples/jsp/mail/sendmail.jsp.
>>
>> You can also send email using URLConnection, or using a third-party
>> library. I think there are some in Commons, but I may be wrong about
that.
>>
>> ~akb
>>
>> | -----Original Message-----
>> | From: John Corrigan [mailto:john@johncorrigan.net]
>> | Sent: Tuesday, May 20, 2003 2:57 PM
>> | To: Tomcat Users List
>> | Subject: Sending e-mail from a servlet
>> |
>> |
>> | System:
>> | Win2K
>> | Java 1.4.1-rc1
>> | Tomcat 1.4.18 (NOT LE)
>> |
>> | Problem:
>> | Attempting to send e-mail yields the following exception:
>> |
>> | ENCOUNTERED EXCEPTION: javax.mail.SendFailedException: Sending
>> | failed; nested exception is: javax.mail.MessagingException:
>> | IOException while sending message; nested exception is:
>> | javax.activation.UnsupportedDataTypeException: no object DCH for
>> | MIME type text/plain
>> |
>> | javax.mail.SendFailedException: Sending failed;
>> | nested exception is:
>> | javax.mail.MessagingException: IOException while sending message;
>> | nested exception is:
>> | javax.activation.UnsupportedDataTypeException: no object
>> | DCH for MIME type text/plain
>> | ...
>> |
>> |
>> |
>> | I've tried extracting the contents of mail.jar to the
>> | WEB-INF/classes directory (as was suggested in some usenet
>> | postings) and that doesn't seem to help. Both mail.jar and
>> | activation.jar are in .../Tomcat-4.1/common/lib.
>> |
>> | Any ideas?
>> |
>> |
>> | ---------------------------------------------------------------------
>> | To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> | For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>> |
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
> LEGAL NOTICE
>
> This electronic mail transmission and any accompanying documents contain
> information belonging to the sender which may be confidential and legally
> privileged. This information is intended only for the use of the
> individual or entity to whom this electronic mail transmission was sent as
> indicated above. If you are not the intended recipient, any disclosure,
> copying, distribution, or action taken in reliance on the contents of the
> information contained in this transmission is strictly prohibited. If you
> have received this transmission in error, please delete the message.
Thank
> you
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Sending e-mail from a servlet
Posted by Sasha Borodin <sa...@whoissasha.com>.
Sorry if I haven't followed this thread closely enough, but have you changed
the host to an actual SMPT server in server.xml?
<Resource name="mail/Session" auth="Container"
type="javax.mail.Session"/>
<ResourceParams name="mail/Session">
<parameter>
<name>mail.smtp.host</name> <--- HERE
<value>localhost</value>
</parameter>
</ResourceParams>
-Sasha
On 5/20/03 15:20, "Micael" <ca...@harbornet.com> wrote:
> Jah, the code is wrong. I had to rewrite it. I cannot remember now what
> was wrong. But it is pretty easy to find. Micael
>
> At 12:13 PM 5/20/03 -0700, you wrote:
>> SendMailServlet is not working in my installations :) The snippet of the
>> stack trace is from /examples/jsp/mail/sendmail.jsp...
>>
>> -----Original Message-----
>> From: Kevin Baynes [mailto:kbaynes@seagullsw.com]
>> Sent: Tuesday, May 20, 2003 12:08 PM
>> To: Tomcat Users List
>> Subject: RE: Sending e-mail from a servlet
>>
>>
>>
>> In the Tomcat examples included with the regular distribution, there is a
>> SendMailServlet at /examples/WEB-INF/classes/SendMailServlet.java that
>> works. Also, look at /examples/jsp/mail/sendmail.jsp.
>>
>> You can also send email using URLConnection, or using a third-party
>> library. I think there are some in Commons, but I may be wrong about that.
>>
>> ~akb
>>
>> | -----Original Message-----
>> | From: John Corrigan [mailto:john@johncorrigan.net]
>> | Sent: Tuesday, May 20, 2003 2:57 PM
>> | To: Tomcat Users List
>> | Subject: Sending e-mail from a servlet
>> |
>> |
>> | System:
>> | Win2K
>> | Java 1.4.1-rc1
>> | Tomcat 1.4.18 (NOT LE)
>> |
>> | Problem:
>> | Attempting to send e-mail yields the following exception:
>> |
>> | ENCOUNTERED EXCEPTION: javax.mail.SendFailedException: Sending
>> | failed; nested exception is: javax.mail.MessagingException:
>> | IOException while sending message; nested exception is:
>> | javax.activation.UnsupportedDataTypeException: no object DCH for
>> | MIME type text/plain
>> |
>> | javax.mail.SendFailedException: Sending failed;
>> | nested exception is:
>> | javax.mail.MessagingException: IOException while sending message;
>> | nested exception is:
>> | javax.activation.UnsupportedDataTypeException: no object
>> | DCH for MIME type text/plain
>> | ...
>> |
>> |
>> |
>> | I've tried extracting the contents of mail.jar to the
>> | WEB-INF/classes directory (as was suggested in some usenet
>> | postings) and that doesn't seem to help. Both mail.jar and
>> | activation.jar are in .../Tomcat-4.1/common/lib.
>> |
>> | Any ideas?
>> |
>> |
>> | ---------------------------------------------------------------------
>> | To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> | For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>> |
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
> LEGAL NOTICE
>
> This electronic mail transmission and any accompanying documents contain
> information belonging to the sender which may be confidential and legally
> privileged. This information is intended only for the use of the
> individual or entity to whom this electronic mail transmission was sent as
> indicated above. If you are not the intended recipient, any disclosure,
> copying, distribution, or action taken in reliance on the contents of the
> information contained in this transmission is strictly prohibited. If you
> have received this transmission in error, please delete the message. Thank
> you
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
RE: Sending e-mail from a servlet
Posted by John Corrigan <jo...@johncorrigan.net>.
Nice to know it isn't just me :)
Do you have a snippet you could send that actually works? I've spent over a
day on this now.
Thanks.
-----Original Message-----
From: Micael [mailto:caraunltd@harbornet.com]
Sent: Tuesday, May 20, 2003 1:20 PM
To: Tomcat Users List
Subject: RE: Sending e-mail from a servlet
Jah, the code is wrong. I had to rewrite it. I cannot remember now what
was wrong. But it is pretty easy to find. Micael
At 12:13 PM 5/20/03 -0700, you wrote:
>SendMailServlet is not working in my installations :) The snippet of the
>stack trace is from /examples/jsp/mail/sendmail.jsp...
>
>-----Original Message-----
>From: Kevin Baynes [mailto:kbaynes@seagullsw.com]
>Sent: Tuesday, May 20, 2003 12:08 PM
>To: Tomcat Users List
>Subject: RE: Sending e-mail from a servlet
>
>
>
>In the Tomcat examples included with the regular distribution, there is a
>SendMailServlet at /examples/WEB-INF/classes/SendMailServlet.java that
>works. Also, look at /examples/jsp/mail/sendmail.jsp.
>
>You can also send email using URLConnection, or using a third-party
>library. I think there are some in Commons, but I may be wrong about that.
>
>~akb
>
>| -----Original Message-----
>| From: John Corrigan [mailto:john@johncorrigan.net]
>| Sent: Tuesday, May 20, 2003 2:57 PM
>| To: Tomcat Users List
>| Subject: Sending e-mail from a servlet
>|
>|
>| System:
>| Win2K
>| Java 1.4.1-rc1
>| Tomcat 1.4.18 (NOT LE)
>|
>| Problem:
>| Attempting to send e-mail yields the following exception:
>|
>| ENCOUNTERED EXCEPTION: javax.mail.SendFailedException: Sending
>| failed; nested exception is: javax.mail.MessagingException:
>| IOException while sending message; nested exception is:
>| javax.activation.UnsupportedDataTypeException: no object DCH for
>| MIME type text/plain
>|
>| javax.mail.SendFailedException: Sending failed;
>| nested exception is:
>| javax.mail.MessagingException: IOException while sending message;
>| nested exception is:
>| javax.activation.UnsupportedDataTypeException: no object
>| DCH for MIME type text/plain
>| ...
>|
>|
>|
>| I've tried extracting the contents of mail.jar to the
>| WEB-INF/classes directory (as was suggested in some usenet
>| postings) and that doesn't seem to help. Both mail.jar and
>| activation.jar are in .../Tomcat-4.1/common/lib.
>|
>| Any ideas?
>|
>|
>| ---------------------------------------------------------------------
>| To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>| For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>|
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
LEGAL NOTICE
This electronic mail transmission and any accompanying documents contain
information belonging to the sender which may be confidential and legally
privileged. This information is intended only for the use of the
individual or entity to whom this electronic mail transmission was sent as
indicated above. If you are not the intended recipient, any disclosure,
copying, distribution, or action taken in reliance on the contents of the
information contained in this transmission is strictly prohibited. If you
have received this transmission in error, please delete the message. Thank
you
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
RE: Sending e-mail from a servlet
Posted by Micael <ca...@harbornet.com>.
Jah, the code is wrong. I had to rewrite it. I cannot remember now what
was wrong. But it is pretty easy to find. Micael
At 12:13 PM 5/20/03 -0700, you wrote:
>SendMailServlet is not working in my installations :) The snippet of the
>stack trace is from /examples/jsp/mail/sendmail.jsp...
>
>-----Original Message-----
>From: Kevin Baynes [mailto:kbaynes@seagullsw.com]
>Sent: Tuesday, May 20, 2003 12:08 PM
>To: Tomcat Users List
>Subject: RE: Sending e-mail from a servlet
>
>
>
>In the Tomcat examples included with the regular distribution, there is a
>SendMailServlet at /examples/WEB-INF/classes/SendMailServlet.java that
>works. Also, look at /examples/jsp/mail/sendmail.jsp.
>
>You can also send email using URLConnection, or using a third-party
>library. I think there are some in Commons, but I may be wrong about that.
>
>~akb
>
>| -----Original Message-----
>| From: John Corrigan [mailto:john@johncorrigan.net]
>| Sent: Tuesday, May 20, 2003 2:57 PM
>| To: Tomcat Users List
>| Subject: Sending e-mail from a servlet
>|
>|
>| System:
>| Win2K
>| Java 1.4.1-rc1
>| Tomcat 1.4.18 (NOT LE)
>|
>| Problem:
>| Attempting to send e-mail yields the following exception:
>|
>| ENCOUNTERED EXCEPTION: javax.mail.SendFailedException: Sending
>| failed; nested exception is: javax.mail.MessagingException:
>| IOException while sending message; nested exception is:
>| javax.activation.UnsupportedDataTypeException: no object DCH for
>| MIME type text/plain
>|
>| javax.mail.SendFailedException: Sending failed;
>| nested exception is:
>| javax.mail.MessagingException: IOException while sending message;
>| nested exception is:
>| javax.activation.UnsupportedDataTypeException: no object
>| DCH for MIME type text/plain
>| ...
>|
>|
>|
>| I've tried extracting the contents of mail.jar to the
>| WEB-INF/classes directory (as was suggested in some usenet
>| postings) and that doesn't seem to help. Both mail.jar and
>| activation.jar are in .../Tomcat-4.1/common/lib.
>|
>| Any ideas?
>|
>|
>| ---------------------------------------------------------------------
>| To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>| For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>|
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
LEGAL NOTICE
This electronic mail transmission and any accompanying documents contain
information belonging to the sender which may be confidential and legally
privileged. This information is intended only for the use of the
individual or entity to whom this electronic mail transmission was sent as
indicated above. If you are not the intended recipient, any disclosure,
copying, distribution, or action taken in reliance on the contents of the
information contained in this transmission is strictly prohibited. If you
have received this transmission in error, please delete the message. Thank
you
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
RE: Sending e-mail from a servlet
Posted by John Corrigan <jo...@johncorrigan.net>.
I have now tried:
1. Extracting mail.jar and activation.jar into the WEB-INF/classes tree.
2. Removing mail.jar and activation.jar from the tomcat/common/lib tree.
3. Added mail.jar and activation.jar into the classpath (defined in the registry
for Tomcat) both individually and together trying each first.
Same exception...
And I thought that any jar file in tomcat/common/lib didn't need to be in the classpath since that is the value of java.ext.dirs which is supposed to be searched before the classpath.
Argh! I really can't affort to lose anymore hair!!! :)
-----Original Message-----
From: Jason Bainbridge [mailto:jason@jblinux.org]
Sent: Tuesday, May 20, 2003 12:24 PM
To: Tomcat Users List
Subject: Re: Sending e-mail from a servlet
On Wed, 21 May 2003 03:13, John Corrigan wrote:
> javax.activation.UnsupportedDataTypeException: no object DCH for
Looking at a few previous similar problems I'd say you need activation.jar to
be in your classpath: http://java.sun.com/products/javabeans/glasgow/jaf.html
Regards,
--
Jason Bainbridge
KDE Web Team - http://kde.org
webmaster@kde.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Sending e-mail from a servlet
Posted by Jason Bainbridge <ja...@jblinux.org>.
On Wed, 21 May 2003 03:13, John Corrigan wrote:
> javax.activation.UnsupportedDataTypeException: no object DCH for
Looking at a few previous similar problems I'd say you need activation.jar to
be in your classpath: http://java.sun.com/products/javabeans/glasgow/jaf.html
Regards,
--
Jason Bainbridge
KDE Web Team - http://kde.org
webmaster@kde.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Performance optimization of the coyote connector
Posted by Philippe Marchand <pm...@speechworks.com>.
Hi
I am running Tomcat 4.1 with the coyote connector and the performance decreases considerably when I have about 100 channels making http requests. This happens even though the server box is not loaded at all at this time: both the memory and the CPU are only partially used. I was wondering what connector configurations would allow me to load more effectively the server.
Thank you
Philippe
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
RE: Sending e-mail from a servlet
Posted by John Corrigan <jo...@johncorrigan.net>.
SendMailServlet is not working in my installations :) The snippet of the stack trace is from /examples/jsp/mail/sendmail.jsp...
-----Original Message-----
From: Kevin Baynes [mailto:kbaynes@seagullsw.com]
Sent: Tuesday, May 20, 2003 12:08 PM
To: Tomcat Users List
Subject: RE: Sending e-mail from a servlet
In the Tomcat examples included with the regular distribution, there is a SendMailServlet at /examples/WEB-INF/classes/SendMailServlet.java that works. Also, look at /examples/jsp/mail/sendmail.jsp.
You can also send email using URLConnection, or using a third-party library. I think there are some in Commons, but I may be wrong about that.
~akb
| -----Original Message-----
| From: John Corrigan [mailto:john@johncorrigan.net]
| Sent: Tuesday, May 20, 2003 2:57 PM
| To: Tomcat Users List
| Subject: Sending e-mail from a servlet
|
|
| System:
| Win2K
| Java 1.4.1-rc1
| Tomcat 1.4.18 (NOT LE)
|
| Problem:
| Attempting to send e-mail yields the following exception:
|
| ENCOUNTERED EXCEPTION: javax.mail.SendFailedException: Sending
| failed; nested exception is: javax.mail.MessagingException:
| IOException while sending message; nested exception is:
| javax.activation.UnsupportedDataTypeException: no object DCH for
| MIME type text/plain
|
| javax.mail.SendFailedException: Sending failed;
| nested exception is:
| javax.mail.MessagingException: IOException while sending message;
| nested exception is:
| javax.activation.UnsupportedDataTypeException: no object
| DCH for MIME type text/plain
| ...
|
|
|
| I've tried extracting the contents of mail.jar to the
| WEB-INF/classes directory (as was suggested in some usenet
| postings) and that doesn't seem to help. Both mail.jar and
| activation.jar are in .../Tomcat-4.1/common/lib.
|
| Any ideas?
|
|
| ---------------------------------------------------------------------
| To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
| For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
|
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
RE: Sending e-mail from a servlet
Posted by Kevin Baynes <kb...@seagullsw.com>.
In the Tomcat examples included with the regular distribution, there is a SendMailServlet at /examples/WEB-INF/classes/SendMailServlet.java that works. Also, look at /examples/jsp/mail/sendmail.jsp.
You can also send email using URLConnection, or using a third-party library. I think there are some in Commons, but I may be wrong about that.
~akb
| -----Original Message-----
| From: John Corrigan [mailto:john@johncorrigan.net]
| Sent: Tuesday, May 20, 2003 2:57 PM
| To: Tomcat Users List
| Subject: Sending e-mail from a servlet
|
|
| System:
| Win2K
| Java 1.4.1-rc1
| Tomcat 1.4.18 (NOT LE)
|
| Problem:
| Attempting to send e-mail yields the following exception:
|
| ENCOUNTERED EXCEPTION: javax.mail.SendFailedException: Sending
| failed; nested exception is: javax.mail.MessagingException:
| IOException while sending message; nested exception is:
| javax.activation.UnsupportedDataTypeException: no object DCH for
| MIME type text/plain
|
| javax.mail.SendFailedException: Sending failed;
| nested exception is:
| javax.mail.MessagingException: IOException while sending message;
| nested exception is:
| javax.activation.UnsupportedDataTypeException: no object
| DCH for MIME type text/plain
| ...
|
|
|
| I've tried extracting the contents of mail.jar to the
| WEB-INF/classes directory (as was suggested in some usenet
| postings) and that doesn't seem to help. Both mail.jar and
| activation.jar are in .../Tomcat-4.1/common/lib.
|
| Any ideas?
|
|
| ---------------------------------------------------------------------
| To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
| For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
|
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org