You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Andy Huhn <am...@hslt-online.com> on 2008/04/23 12:28:06 UTC

[T5]: javax.mail from Tapestry

Hello,

In my dev environment (running jetty6 from inside Eclipse), I'm able to
use javax.mail classes and successfully connect to my mail server to
send a message.  But when I migrate the code to my production server
(jetty6 also), everything seems to work correctly except that the app
doesn't connect to the outbound mail server.

I've watched the packets (tcpdump), so I know that the webserver isn't
even trying to connect to the mail server.

There are no errors mentioned in the log.  In fact, I can only get
startup/shutdown messages and Hibernate messages written to the log, for
some reason I can't seem to control what's being logged in production
(although I can in dev).

The logging is not my major issue...I don't care about that as long as I
get mail working (I'll go back and fix logging later).

Can someone help me with javax.mail?

Here is the relevant line from my pom.xml:

  <dependency>
    <groupId>javax.mail</groupId>
    <artifactId>mail</artifactId>
    <version>1.4.1</version>
  </dependency>

Help?  Perhaps the first step is to try to get logging working.

Thanks,
Andy


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5]: javax.mail from Tapestry

Posted by Andy Huhn <am...@hslt-online.com>.
I thought about that, but wouldn't tcpdump show the packets, even if
they were being blocked?  I was looking for all packets with port 25.

Also, my code that's using javax.mail to send a message is looking for
exceptions, and writing to the log file if that happens.  I haven't seen
anything in the log file (although, like I mentioned, it's possible that
my logging is broken).

Heading off to work now...I'll check in on this again tonight/tomorrow
morning.

Thanks again for all your help (in advance),
Andy

On Wed, 2008-04-23 at 12:37 +0200, Chris Lewis wrote:
> Hi Andy,
> 
> If exceptions aren't being thrown from the services/pages that use the
> mail classes, then the javax.mail is present. Is it possible that your
> server (or it's network) is blocking outbound smtp connections?
> 
> chris
> 
> Andy Huhn wrote:
> > Hello,
> >
> > In my dev environment (running jetty6 from inside Eclipse), I'm able to
> > use javax.mail classes and successfully connect to my mail server to
> > send a message.  But when I migrate the code to my production server
> > (jetty6 also), everything seems to work correctly except that the app
> > doesn't connect to the outbound mail server.
> >
> > I've watched the packets (tcpdump), so I know that the webserver isn't
> > even trying to connect to the mail server.
> >
> > There are no errors mentioned in the log.  In fact, I can only get
> > startup/shutdown messages and Hibernate messages written to the log, for
> > some reason I can't seem to control what's being logged in production
> > (although I can in dev).
> >
> > The logging is not my major issue...I don't care about that as long as I
> > get mail working (I'll go back and fix logging later).
> >
> > Can someone help me with javax.mail?
> >
> > Here is the relevant line from my pom.xml:
> >
> >   <dependency>
> >     <groupId>javax.mail</groupId>
> >     <artifactId>mail</artifactId>
> >     <version>1.4.1</version>
> >   </dependency>
> >
> > Help?  Perhaps the first step is to try to get logging working.
> >
> > Thanks,
> > Andy
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> >   
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5]: javax.mail from Tapestry

Posted by Chris Lewis <ch...@bellsouth.net>.
Hi Andy,

If exceptions aren't being thrown from the services/pages that use the
mail classes, then the javax.mail is present. Is it possible that your
server (or it's network) is blocking outbound smtp connections?

chris

Andy Huhn wrote:
> Hello,
>
> In my dev environment (running jetty6 from inside Eclipse), I'm able to
> use javax.mail classes and successfully connect to my mail server to
> send a message.  But when I migrate the code to my production server
> (jetty6 also), everything seems to work correctly except that the app
> doesn't connect to the outbound mail server.
>
> I've watched the packets (tcpdump), so I know that the webserver isn't
> even trying to connect to the mail server.
>
> There are no errors mentioned in the log.  In fact, I can only get
> startup/shutdown messages and Hibernate messages written to the log, for
> some reason I can't seem to control what's being logged in production
> (although I can in dev).
>
> The logging is not my major issue...I don't care about that as long as I
> get mail working (I'll go back and fix logging later).
>
> Can someone help me with javax.mail?
>
> Here is the relevant line from my pom.xml:
>
>   <dependency>
>     <groupId>javax.mail</groupId>
>     <artifactId>mail</artifactId>
>     <version>1.4.1</version>
>   </dependency>
>
> Help?  Perhaps the first step is to try to get logging working.
>
> Thanks,
> Andy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>   

-- 
http://thegodcode.net


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5]: javax.mail from Tapestry

Posted by Andy Huhn <am...@hslt-online.com>.
Thanks, Peter and Chris, for your help.  I finally figured out what it
was...I had two conflicting copies of javax.mail installed.  I had it
included in my pom.xml, and I had a Debian package installed
libgnumail-java.  (I'm on a Debian server).  For some reason, the two
didn't play nice together.

I uninstalled the Debian package, and it seems to be working
beautifully.

Thanks again for your help!

Andy

On Wed, 2008-04-23 at 14:00 +0300, Peter Stavrinides wrote:
> Sounds like an issue with the server configuration, I suggest you get 
> the logs to work first, then you might get a better idea of why the mail 
> isn't working... if it works in development then chances are you are 
> missing a host entry or something small like that, which will pop up in 
> the logs.
> 
> Andy Huhn wrote:
> > Hello,
> >
> > In my dev environment (running jetty6 from inside Eclipse), I'm able to
> > use javax.mail classes and successfully connect to my mail server to
> > send a message.  But when I migrate the code to my production server
> > (jetty6 also), everything seems to work correctly except that the app
> > doesn't connect to the outbound mail server.
> >
> > I've watched the packets (tcpdump), so I know that the webserver isn't
> > even trying to connect to the mail server.
> >
> > There are no errors mentioned in the log.  In fact, I can only get
> > startup/shutdown messages and Hibernate messages written to the log, for
> > some reason I can't seem to control what's being logged in production
> > (although I can in dev).
> >
> > The logging is not my major issue...I don't care about that as long as I
> > get mail working (I'll go back and fix logging later).
> >
> > Can someone help me with javax.mail?
> >
> > Here is the relevant line from my pom.xml:
> >
> >   <dependency>
> >     <groupId>javax.mail</groupId>
> >     <artifactId>mail</artifactId>
> >     <version>1.4.1</version>
> >   </dependency>
> >
> > Help?  Perhaps the first step is to try to get logging working.
> >
> > Thanks,
> > Andy
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >   
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5]: javax.mail from Tapestry

Posted by Peter Stavrinides <p....@albourne.com>.
Sounds like an issue with the server configuration, I suggest you get 
the logs to work first, then you might get a better idea of why the mail 
isn't working... if it works in development then chances are you are 
missing a host entry or something small like that, which will pop up in 
the logs.

Andy Huhn wrote:
> Hello,
>
> In my dev environment (running jetty6 from inside Eclipse), I'm able to
> use javax.mail classes and successfully connect to my mail server to
> send a message.  But when I migrate the code to my production server
> (jetty6 also), everything seems to work correctly except that the app
> doesn't connect to the outbound mail server.
>
> I've watched the packets (tcpdump), so I know that the webserver isn't
> even trying to connect to the mail server.
>
> There are no errors mentioned in the log.  In fact, I can only get
> startup/shutdown messages and Hibernate messages written to the log, for
> some reason I can't seem to control what's being logged in production
> (although I can in dev).
>
> The logging is not my major issue...I don't care about that as long as I
> get mail working (I'll go back and fix logging later).
>
> Can someone help me with javax.mail?
>
> Here is the relevant line from my pom.xml:
>
>   <dependency>
>     <groupId>javax.mail</groupId>
>     <artifactId>mail</artifactId>
>     <version>1.4.1</version>
>   </dependency>
>
> Help?  Perhaps the first step is to try to get logging working.
>
> Thanks,
> Andy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org