continuum-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tonté Pouncil <Tonte.Poun...@aviall.com>
Subject Re: can't send mail - using tomcat6, java6, and continuum1.1
Date Fri, 04 Apr 2008 15:24:47 GMT
I experienced this same problem when I first got started with continuum a
few months back, and what I discovered, after downloading the source for
the plexus-mail-sender-javamail project,  was the AbstractJavamailSender
always tried to authenticate with a username and password.  So if you don't
need to authenticate, you will run into problems.  In addition to this, the
smtp variable name the AbstractJavamailSender uses does not follow the
naming convention that specifies if you are using SSL or not.  I read
somewhere that if you are using SSL, you should use a trailing s after the
protocol name (i.e. mail.smtps.host).  But the AbstractJavamailSender only
defines non SSL smtp variables like so: mail.smtp.host.  Granted this class
make up for the naming convention by checking wheather the mail.smtp.auth,
mail.smtp.user, and mail.smtp.password variables are set and if so it
switches the protocol to smtps.  Below are a list of some of the defined
variable the AbstractJavamailSender defines:
mail.smtp.host
mail.smtp.port
mail.smtp.auth
mail.smtp.user
password
mail.smtp.timeout
mail.transport.protocol (i.e. smtp or smtps)
mail.smtp.debug

These variables need to be set in your web.xml or context.xml file; which
is located inside your Continuum web application.

After setting all of this, there was still a bug in the
plexus-mail-sender-javamail project, so I modified the
AbstractJavamailSender.send() method to find all the correct smtp variable
name and properly check for the mail.smtp.auth variable.  If this variable
was set to true I authenticated on the mail server if it was false I did
not authenticate.  After I did all of this, I jar up everything and
replaced the jar file continuum came with.

You can download the plexus-mail-sender-javamail source code from:
http://plexus.codehaus.org/plexus-components/plexus-mail-sender/plexus-mail-senders/plexus-mail-sender-javamail/project-info.html

Let me know if this helped you out.  If you like I can send you the code
that I changed to get it all working.

Tonté



                                                                           
             "Christopher                                                  
             Lyth"                                                         
             <christopher.lyth                                          To 
             @gmail.com>               users@continuum.apache.org          
                                                                        cc 
             04/04/2008 09:20                                              
             AM                                                    Subject 
                                       Re: can't send mail - using         
                                       tomcat6, java6, and continuum1.1    
             Please respond to                                             
             users@continuum.a                                             
                 pache.org                                                 
                                                                           
                                                                           
                                                                           




Yes I tried the default setup first. I dont have the logs from that but the
email didn't go out then either.

On Fri, Apr 4, 2008 at 5:56 AM, Mick Knutson <mickknutson@gmail.com> wrote:

> Have you tried localhost just to see if you can send locally?
>
>


--
Christopher J Lyth
christopher.lyth@gmail.com




Mime
View raw message