4 messages in com.mysql.lists.javaRe: Sending e-mails from servlet+mysq...
FromSent OnAttachments
Edilmar Alves13 May 2000 07:33 
Tim Endres13 May 2000 09:25 
Edilmar Alves15 May 2000 11:50 
Tim Endres15 May 2000 13:16 
Subject:Re: Sending e-mails from servlet+mysql app
From:Tim Endres (ti@trustice.com)
Date:05/15/2000 01:16:46 PM
List:com.mysql.lists.java

If you set those properties correctly, and are sure of that, then it sounds like the servlet is not properly loading all of JavaMail. Are you using the JavaMail JAR file on your classpath? Do you read a javamail.providers file from anywhere other than the mail.jar file?

JavaMail's earlier releases suffered from the problem of reading only one javamail.providers file. Thus, if you loaded one from your classpath that was not in the mail.jar file, you lost the settings in that providers file. Thus, if you read your own javamail.providers file, then you would lose the settings for the SMTP transport provider.

If you have your own providers file, try copying the entries from the file in mail.jar into your file.

HTH, tim.

Tim Endres escreveu:

I have an app with JBuilder 3 C/S + MySQL 3.23 + Apache + JServ 1.1 + [NT 4.0 or RH 6.2]. Then, after process some data, I would like to send an e-mail to the customer. However, JServ arises an exception like this: javax.mail.NoSuchProviderException: No provider for Address type: rfc822 at javax.mail.Session.getTransport(Session.java:475) at javax.mail.Transport.send0(Compiled Code) at javax.mail.Transport.send(Transport.java:80) at Comum.Mail.EnviarMsg(Mail.java:50) at Consulta.ServletResConsulta.OpEnviar(ServletResConsulta.java:959)

Does anyone know what's the problem ???

The most likely problem is that a property is not set properly. You need to set the transport property 'mail.transport.protocol'. If it is smtp, then you also need to set the 'mail.smtp.host' property.

tim.

Hi, I have set the properties fine. Into JBuilder environment, the e-mail is sent fine. However, when I try to run the servlet into JServ, the exception above occurs. If I call "session.getProviders" and "session.getTransport", the same exception occurs when running int JServ, but not with JBuilder. I have thought about file javamail.default.providers that is not into .jar final file, because
of Deployment Wizard doesn't deploy this file to .jar. And session needs to setup the Providers var with this file, right ? Is there some other way to setup the Providers into session ?