Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 96262 invoked from network); 24 Jan 2006 07:19:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 Jan 2006 07:19:54 -0000 Received: (qmail 61739 invoked by uid 500); 24 Jan 2006 07:19:51 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 61717 invoked by uid 500); 24 Jan 2006 07:19:51 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 61704 invoked by uid 99); 24 Jan 2006 07:19:50 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Jan 2006 23:19:50 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [193.201.199.29] (HELO gate.dekasoft.com.ua) (193.201.199.29) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Jan 2006 23:19:49 -0800 Received: from [192.168.1.10] (alex.dekasoft.com.ua [192.168.1.10]) by gate.dekasoft.com.ua (Postfix) with ESMTP id 174CC3C0119 for ; Tue, 24 Jan 2006 09:19:25 +0200 (EET) Message-ID: <43D5D518.6010103@dekasoft.com.ua> Date: Tue, 24 Jan 2006 09:19:52 +0200 From: Alex Andrushchak User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: user@geronimo.apache.org Subject: Re: javamail References: In-Reply-To: Content-Type: multipart/alternative; boundary="------------020304020108050705050105" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. --------------020304020108050705050105 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Hi! I have only application scope plan, but i think you can use it as start point for create your server scope plan: geronimo/geronimo-mail/1.0 geronimo/geronimo-javamail-transport/1.0 smtp false 192.168.1.2 mail.debug=true mail.smtp.port=25 mail.from=queryphone-geronimo@dekasoft.com.ua yskim@symcor.com wrote: >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 >javamail. > >Thanks, > >Young > > > > > "Jakob F�rch > (Trifork)" > To > user@geronimo.apache.org > 20/01/2006 12:55 cc > PM > Subject > Re: javamail > Please respond to > user@geronimo.apa > che.org > > > > > > > > > >Alex Andrushchak wrote: > > >>Ok, i've moved from dead point :-) >> >> >> > >Wonderful! > > > >>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 >geronimo-1.0\repository\geronimo\jars\geronimo-javamail-transport-1.0.jar. > >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: > > geronimo > geronimo-javamail-transport > 1.0 > > > > > >>My application configuration is: >> >class="org.apache.geronimo.mail.SMTPTransportGBean"> >> 192.168.1.2 >> 25 >> >name="from">queryphone-geronimo@dekasoft.com.ua >> >> >class="org.apache.geronimo.mail.MailGBean"> >> smtp >> true >> mail.debug=true >> >> protocol.smtp >> >> >> >> > >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: > > > ${smtpHost} > > mail.from=${smtpFrom} > mail.smtp.port=${smtpPort} > > > >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. > >Jakob > > > > > --------------020304020108050705050105 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi!

I have only application scope plan, but i think you can use it as start point for create your server scope plan:

<application
       xmlns="http://geronimo.apache.org/xml/ns/j2ee/application"
       configId="org/queryphone/Queryphone">

    <dependency>
        <uri>geronimo/geronimo-mail/1.0</uri>
    </dependency>

    <dependency>
        <uri>geronimo/geronimo-javamail-transport/1.0</uri>
    </dependency>

    <gbean name="mail/MailSession" class="org.apache.geronimo.mail.MailGBean">
        <attribute name="transportProtocol">smtp</attribute>
        <attribute name="useDefault">false</attribute>
        <attribute name="host">192.168.1.2</attribute>
        <attribute name="properties">
            mail.debug=true
            mail.smtp.port=25
            mail.from=queryphone-geronimo@dekasoft.com.ua
        </attribute>   
    </gbean>

</application>

yskim@symcor.com wrote:
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
javamail.

Thanks,

Young



                                                                           
             "Jakob Færch                                                  
             (Trifork)"                                                    
             <jrf@trifork.com>                                          To 
                                       user@geronimo.apache.org            
             20/01/2006 12:55                                           cc 
             PM                                                            
                                                                   Subject 
                                       Re: javamail                        
             Please respond to                                             
             user@geronimo.apa                                             
                  che.org                                                  
                                                                           
                                                                           
                                                                           






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

    

Wonderful!

  
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
geronimo-1.0\repository\geronimo\jars\geronimo-javamail-transport-1.0.jar.

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:
<dependency>
     <groupId>geronimo</groupId>
     <artifactId>geronimo-javamail-transport</artifactId>
     <version>1.0</version>
</dependency>


  
My application configuration is:
   <gbean name="protocol.smtp"
class="org.apache.geronimo.mail.SMTPTransportGBean">
       <attribute name="host">192.168.1.2</attribute>
       <attribute name="port">25</attribute>
       <attribute
name="from">queryphone-geronimo@dekasoft.com.ua</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">
         mail.from=${smtpFrom}
         mail.smtp.port=${smtpPort}</attribute>
</gbean>


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.

Jakob



  

--------------020304020108050705050105--