geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Andrushchak <us...@dekasoft.com.ua>
Subject Re: javamail
Date Tue, 24 Jan 2006 07:19:52 GMT
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
>
>
>
>  
>


Mime
View raw message