geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject CORRECTION <- Fw: javamail
Date Mon, 23 Jan 2006 21:58:52 GMT
Sorry for the confusion.  I should have said "I could NOT find a sample
deployment plan for
javamail" instead.



----- Forwarded by Young Kim/TOR/SYM on 23/01/2006 04:59 PM -----
             23/01/2006 04:56                                           To 
             Please respond to                                     Subject 
             user@geronimo.apa         Re: javamail                        

Hello, could I have a good deployment plan XML file so that I can deploy
mail in the server scope.  I do not want to put the deployment part in
geronimo-application.xml.  I could find a sample deployment plan for



             "Jakob Færch
             <>                                          To
             20/01/2006 12:55                                           cc
                                       Re: javamail
             Please respond to

Alex Andrushchak wrote:
> Ok, i've moved from dead point :-)


> Now i have another problem:
> Cannot send the message with MailerBean:java.lang.Exception: The message
> can not be send : Unable to locate provider for protocol: smtp

The transport for smtp is located in the file

By some odd mistake, it is not included in the tomcat distribution.
If you are using a jetty distribution, the jar file should be there all
right in GERONIMO_INSTALL_DIR/repository/geronimo/jars.
If you are on a tomcat distribution, I _guess_ you would be fine
downloading the jetty distribution and manually copying the jar file
from the above directory in the jetty distribution to the same directory
  in the tomcat distribution - anyone: feel free to correct me on this!

In order to make the smtp transport available to your application, you
need to add the following dependency to the application's plan:

> My application configuration is:
>    <gbean name="protocol.smtp"
> class="org.apache.geronimo.mail.SMTPTransportGBean">
>        <attribute name="host"></attribute>
>        <attribute name="port">25</attribute>
>        <attribute
> name="from"></attribute>      </gbean>
>    <gbean name="mail/MailSession"
> class="org.apache.geronimo.mail.MailGBean">
>        <attribute name="transportProtocol">smtp</attribute>
>        <attribute name="useDefault">true</attribute>
>        <attribute name="properties">mail.debug=true</attribute>
> <reference name="Protocols">
>            <name>protocol.smtp</name>
>        </reference>
>    </gbean>

It's not (yet) entirely well documented how to set up the necessary
GBeans - to say the least.
It seems in the AdventureBuilder (which is able to send mail using the
smtp transport and javamail), the following GBean is sufficient:

<gbean name="mail/MailSession" class="org.apache.geronimo.mail.MailGBean">
         <attribute name="host">${smtpHost}</attribute>
         <attribute name="properties">

Note that compared to you configuration, the smtp host and port is on
the MailGBean, not the SMTPTransportGBean. I guess things will work with
the SMTPTransportGBean configured alongside the MailGBean, but my
experience was that the SMTPTransportGBean was not necessary - anyone:
correct me on this!

Alex, I hope this helps you; please keep the list updated on your progress.


View raw message