Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Attach MIME-TYPE application/smil to email

5 views
Skip to first unread message

Eric Berry

unread,
Mar 1, 2002, 4:13:55 AM3/1/02
to
I am trying to generate an email that will send a file with mime-type
'application/smil' but I keep getting an error:

Here is my code:

------

<%@ page contentType="text/html; charset=utf8" language="java"
import="javax.activation.*,javax.mail.internet.*,javax.mail.*,java.io.*,java.util.*,java.text.*"%>
<%
java.util.Properties props = new Properties();
props.put("mail.smtp.host","localhost");
Session msession = Session.getDefaultInstance(props, null);
javax.mail.internet.MimeMessage msg = new
javax.mail.internet.MimeMessage(msession);
msg.setFrom(new InternetAddress("be...@infowest.com"));
InternetAddress[] raddress = { new InternetAddress("cav...@mac.com")
};
msg.setRecipients(javax.mail.Message.RecipientType.TO, raddress);
msg.setSubject("test");
msg.setSentDate(new java.util.Date());
java.io.File smilFile = new java.io.File("/tmp/test.smi");
msg.setContent(smilFile, "application/smil");
Transport.send(msg);
%>

-----

And here's the error I get:

500 Servlet 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 application/smil
at javax.mail.Transport.send0(Transport.java:218)
at javax.mail.Transport.send(Transport.java:80)
at _test__jsp._jspService(/test.jsp:14)
at com.caucho.jsp.JavaPage.service(JavaPage.java:74)
at com.caucho.jsp.Page.subservice(Page.java:485)
at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:179)
at com.caucho.server.http.Invocation.service(Invocation.java:288)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:132)
at com.caucho.server.http.ServletServer.serviceTop(ServletServer.java:937)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:213)
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:158)
at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
at java.lang.Thread.run(Thread.java:536)

-----------

Can anyone tell me how I can create a Data Control Handler (DCH) with
this mime-type?

Thanks :)

Eric Berry
cav...@mac.com

0 new messages