|
Ol� pessoal da lista
Tenho um documento HTML com um formul�rio com os campos:
- host = servidor SMTP
- to - destinat�rio
- from - remetente
- filename - arquivo a ser atachado
Este formul�rio chama um servlet que envia e-mails. O problema ocorre bem
na hora do envio, pois o servlet n�o encontra o arquivo ( que est� local na
minha m�quina ).
Acho que o problema � com barras, algo do tipo ( "c:\arquivo.txt" ) por (
"c:\\arquivo.txt" ) ou algo parecido. J� tentei as duas anteriores, algu�m sabe
o que pode ser realmente? Segue abaixo o log de erros:
java.io.FileNotFoundException: c:\boot.ini (No such file or
directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java, Compiled Code) at java.io.FileInputStream.<init>(FileInputStream.java, Compiled Code) at javax.activation.FileDataSource.getInputStream(FileDataSource.java, Compiled Code) at javax.activation.DataHandler.writeTo(DataHandler.java, Compiled Code) at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java, Compiled Code) at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java, Compiled Code) at javax.mail.internet.MimeMultipart.writeTo(MimeMultipart.java:204) at com.sun.mail.handlers.multipart_mixed.writeTo(multipart_mixed.java:78) at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java, Compiled Code) at javax.activation.DataHandler.writeTo(DataHandler.java, Compiled Code) at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java, Compiled Code) at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1308) at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:170) at javax.mail.Transport.send0(Transport.java:149) at javax.mail.Transport.send(Transport.java:73) at sendfile2.enviaEmail(sendfile2.java:211) at sendfile2.doPost(sendfile2.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code) at org.apache.jserv.JServConnection.processRequest(JServConnection.java, Compiled Code) at org.apache.jserv.JServConnection.run(JServConnection.java, Compiled Code) at java.lang.Thread.run(Thread.java, Compiled Code) sendfile2 - erro ao enviar o e-mail sendfile2 - exception = javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.MessagingException: IOException while sending message; nested exception is: java.io.FileNotFoundException: c:\boot.ini (No such file or directory) Eduardo de Souza Bernardino N�cleo Java - Desenvolvedor [EMAIL PROTECTED] R. Luigi Galvani, 200 - 4� andar - conj. 41 CEP: 04575 020 - Brooklin Novo S�o Paulo - SP Tel/Fax: (5511) 5505-5150 www.ecorp.com.br
|

