From users-return-6313-apmail-continuum-users-archive=continuum.apache.org@continuum.apache.org Mon Apr 07 20:27:09 2008 Return-Path: Delivered-To: apmail-continuum-users-archive@www.apache.org Received: (qmail 71128 invoked from network); 7 Apr 2008 20:27:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Apr 2008 20:27:07 -0000 Received: (qmail 38136 invoked by uid 500); 7 Apr 2008 20:27:05 -0000 Delivered-To: apmail-continuum-users-archive@continuum.apache.org Received: (qmail 38111 invoked by uid 500); 7 Apr 2008 20:27:05 -0000 Mailing-List: contact users-help@continuum.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@continuum.apache.org Delivered-To: mailing list users@continuum.apache.org Received: (qmail 38102 invoked by uid 99); 7 Apr 2008 20:27:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Apr 2008 13:27:05 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of christopher.lyth@gmail.com designates 64.233.178.240 as permitted sender) Received: from [64.233.178.240] (HELO hs-out-0708.google.com) (64.233.178.240) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Apr 2008 20:26:20 +0000 Received: by hs-out-0708.google.com with SMTP id k27so1153028hsc.2 for ; Mon, 07 Apr 2008 13:26:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=FPwdNe/eYg5Ci22vz2Ww/SqwmfqhSp+oCB8it1lHnrg=; b=mn3WGqQhvJ79hP7YreusNCiF7GgMbmNINAxWp3PQIgdjfEs3x1Nqwgz6QtY6cPRIPlIwLwnez88MDPk4Xa8xjn10l22BFVQDLiqVkyM0zJ6FDX6z3Hr6+2chQU91c5p6dTG2oukyYSu2zvd85+7UMFu8NCaF8VPkm3mb/iNTxxI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=Q9Y+8hl/ZX///vskGF3eDRjX9a/ZEhX03VEIG4IU/V8cNXclrho8eKRTWwSq9w/Hsa1PSk2FPd0oGSFDphferkwdUxmsGbyjq8S8n//YX6EqRThXcWUEOHibhWdkGMGvgNwvB97qq1wMZ5oUoFEoPrwiFofnv7M/5v7XKjGpsoY= Received: by 10.100.139.14 with SMTP id m14mr11213840and.35.1207599992299; Mon, 07 Apr 2008 13:26:32 -0700 (PDT) Received: by 10.100.163.17 with HTTP; Mon, 7 Apr 2008 13:26:32 -0700 (PDT) Message-ID: <9d9469490804071326x7a7ddd5y211e86932521898c@mail.gmail.com> Date: Mon, 7 Apr 2008 16:26:32 -0400 From: "Christopher Lyth" To: users@continuum.apache.org Subject: Re: can't send mail - using tomcat6, java6, and continuum1.1 In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_17727_10876552.1207599992282" References: <9d9469490804071215j2701bc23p54fafa0d58d24e41@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_17727_10876552.1207599992282 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Here are the problems I have found so far: Properties props =3D new Properties(s.getProperties()); // *thi= s does not copy the properties over from the JNDI Resource config* props.putAll(s.getProperties()); // *this will copy the properties over* The password is still not in the props object because it is not in the properties from the session (s.getProperties()). I assume something is nulling out that property. I added this block of code along with a custom property in the JNDI config to hold my password, I chose the key "mail.password" held in PASSWORD. if (!props.containsKey(MAIL_SMTP_PASSWORD) && props.containsKey(PASSWORD)) { log.debug("setting the password from our custom property"); props.put(MAIL_SMTP_PASSWORD, props.get(PASSWORD)); // PASSWORD is the key to my custom property } Not really happy but the emails are sending and that was my goal. I might spend some time trying to track down the problem later in the week. On Mon, Apr 7, 2008 at 3:30 PM, Tont=E9 Pouncil wrote: > OK, well let me know how it goes... Again I believe there is a bug in the > AbstractJavamailMailSender class. Let me know if you want me to send you > what I have because I didn't spend to much time trying to figure out why > the pleus-mail-sender-javamail code does not work right. > > > > > > "Christopher > Lyth" > @gmail.com> users@continuum.apache.org > cc > 04/07/2008 02:15 > PM Subjec= t > Re: can't send mail - using > tomcat6, java6, and continuum1.1 > Please respond to > users@continuum.a > pache.org > > > > > > > > Thanks for your suggestions... I tried to set the properties as you > suggested with no luck. Today I downloaded the source that contains > AbstractJavamailMailSender and started adding debug messages. It seems th= e > password is null... > > I'm using the JNDI mail config and it seems the property is never getting > set. When i Hard coded the password as a test and deployed the jar to > tomcat > the emails started to send. > > On Fri, Apr 4, 2008 at 11:49 AM, Tont=E9 Pouncil > wrote: > > > Oh, and one last thing! I would tring downloading JavaMail and running > a > > quick test to make sure you have all the right smtp setting for you > email > > account. You can run a quick test using JavaMail's smtpsend class. You > > may > > find that you have the wrong host name as I discovered this trying to > > connect to AT&T email account. > > > > Actually the more I think about it, I think one of the problems with th= e > > pleus-mail-sender-javamail code was it did not use the SMTPTransport > > class. > > > > Anyway I hope you are able to get pass this issue. > > > > Tont=E9 > > > > > > > > Tont=E9 Pouncil > > > iall.com> > To > > users@continuum.apache.org > > 04/04/2008 10:25 > cc > > AM > > > Subject > > Re: can't send mail - using > > Please respond to tomcat6, java6, and continuum1.1 > > users@continuum.a > > pache.org > > > > > > > > > > > > > > > > > > I experienced this same problem when I first got started with continuum > a > > few months back, and what I discovered, after downloading the source fo= r > > the plexus-mail-sender-javamail project, was the AbstractJavamailSende= r > > 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 define= d > > 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 di= d > > 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-ma= il-senders/plexus-mail-sender-javamail/project-info.html > > > > > > > Let me know if this helped you out. If you like I can send you the cod= e > > that I changed to get it all working. > > > > Tont=E9 > > > > > > > > > > "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 > > wrote: > > > > > Have you tried localhost just to see if you can send locally? > > > > > > > > > > > > -- > > Christopher J Lyth > > christopher.lyth@gmail.com > > > > > > > > > > > > > > > > > > > -- > Christopher J Lyth > christopher.lyth@gmail.com > > > > --=20 Christopher J Lyth christopher.lyth@gmail.com ------=_Part_17727_10876552.1207599992282--