commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luke DeWitt" <luke.dew...@penguinfire.com>
Subject Commons Email Problem
Date Mon, 06 Nov 2006 17:18:12 GMT
Hi List!

My first send out here and I am hoping that I can find my answer.

I am using commons email to send out notifications for users of our site. This is the code
I have inside our "Privacy Broker" which is basically a fancy name to hold user info at the
moment.

 public void sendEmail(String host, String emailer, String password, String fromAddress, String
fromName, String toAddress, String subject, String body, String[] bccLists){
  try {
   HtmlEmail email = new HtmlEmail();
//   email.setAuthentication(emailer, password);
   email.setHostName(host);
   email.setFrom(fromAddress,fromName);
   email.addTo(toAddress);
   email.setSubject(subject);
   email.setMsg(body);
   if(bccLists != null){
    for(String s:bccLists) email.addBcc(s);
   }
   email.send();
   
  } catch (EmailException e) {
   e.printStackTrace();
  } 
 }


Now for some reason, the mail is working fine some of the time, but more times than none,
we are getting this error in our logs.

org.apache.commons.mail.EmailException: Sending the email to the following server failed :
mail.ourmailserver.com:25
 at org.apache.commons.mail.Email.sendMimeMessage(Email.java:873)
 at org.apache.commons.mail.Email.send(Email.java:898)
 at com.adsmack.privacybroker.PrivacyBroker.sendEmail(PrivacyBroker.java:132)
 at com.adsmack.privacybroker.PrivacyBroker.sendCommunicationToPUID(PrivacyBroker.java:94)
 at com.adsmack.privacybroker.PrivacyBroker.sendCommunicationToUser(PrivacyBroker.java:241)
 at com.adsmack.smacklet.GenericSmacklet.sendCommunicationToUser(GenericSmacklet.java:256)
 at com.adsmack.smacklet.registration.presentation.RegistrationSmacklet.sendConfirmationEmail(RegistrationSmacklet.java:549)
 at com.adsmack.smacklet.registration.presentation.RegistrationSmacklet.doView(RegistrationSmacklet.java:99)
 at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:247)
 at javax.portlet.GenericPortlet.render(GenericPortlet.java:175)
 at org.apache.jetspeed.factory.JetspeedPortletInstance.render(JetspeedPortletInstance.java:102)
 at org.apache.jetspeed.container.JetspeedContainerServlet.doGet(JetspeedContainerServlet.java:230)
 at org.apache.jetspeed.container.JetspeedContainerServlet.doPost(JetspeedContainerServlet.java:344)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
 at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
 at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
 at org.apache.jetspeed.container.invoker.ServletPortletInvoker.invoke(ServletPortletInvoker.java:215)
 at org.apache.jetspeed.container.invoker.ServletPortletInvoker.render(ServletPortletInvoker.java:126)
 at org.apache.pluto.PortletContainerImpl.renderPortlet(PortletContainerImpl.java:119)
 at org.apache.jetspeed.container.JetspeedPortletContainerWrapper.renderPortlet(JetspeedPortletContainerWrapper.java:120)
 at org.apache.jetspeed.aggregator.impl.RenderingJobImpl.execute(RenderingJobImpl.java:121)
 at org.apache.jetspeed.aggregator.impl.PortletRendererImpl.renderNow(PortletRendererImpl.java:120)
 at org.apache.jetspeed.aggregator.impl.PageAggregatorImpl.aggregateAndRender(PageAggregatorImpl.java:199)
 at org.apache.jetspeed.aggregator.impl.PageAggregatorImpl.aggregateAndRender(PageAggregatorImpl.java:182)
 at org.apache.jetspeed.aggregator.impl.PageAggregatorImpl.build(PageAggregatorImpl.java:106)
 at org.apache.jetspeed.aggregator.AggregatorValve.invoke(AggregatorValve.java:48)
 at org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:166)
 at org.apache.jetspeed.decoration.DecorationValve.invoke(DecorationValve.java:110)
 at org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:166)
 at org.apache.jetspeed.pipeline.valve.impl.ActionValveImpl.invoke(ActionValveImpl.java:151)
 at org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:166)
 at org.apache.jetspeed.container.ContainerValve.invoke(ContainerValve.java:76)
 at org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:166)
 at org.apache.jetspeed.profiler.impl.ProfilerValveImpl.invoke(ProfilerValveImpl.java:255)
 at org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:166)
 at org.apache.jetspeed.security.impl.LoginValidationValveImpl.invoke(LoginValidationValveImpl.java:159)
 at org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:166)
 at org.apache.jetspeed.security.impl.PasswordCredentialValveImpl.invoke(PasswordCredentialValveImpl.java:149)
 at org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:166)
 at org.apache.jetspeed.localization.impl.LocalizationValveImpl.invoke(LocalizationValveImpl.java:169)
 at org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:166)
 at org.apache.jetspeed.security.impl.AbstractSecurityValve$1.run(AbstractSecurityValve.java:117)
 at java.security.AccessController.doPrivileged(Native Method)
 at javax.security.auth.Subject.doAsPrivileged(Subject.java:454)
 at org.apache.jetspeed.security.impl.AbstractSecurityValve.invoke(AbstractSecurityValve.java:111)
 at org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:166)
 at org.apache.jetspeed.container.url.impl.PortalURLValveImpl.invoke(PortalURLValveImpl.java:67)
 at org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:166)
 at org.apache.jetspeed.capabilities.impl.CapabilityValveImpl.invoke(CapabilityValveImpl.java:128)
 at org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:166)
 at org.apache.jetspeed.pipeline.JetspeedPipeline.invoke(JetspeedPipeline.java:145)
 at org.apache.jetspeed.engine.JetspeedEngine.service(JetspeedEngine.java:214)
 at org.apache.jetspeed.engine.JetspeedServlet.doGet(JetspeedServlet.java:238)
 at org.apache.jetspeed.engine.JetspeedServlet.doPost(JetspeedServlet.java:265)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at com.adsmack.framework.business.filters.HibernateFilter.doFilter(HibernateFilter.java:28)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
 at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
 at org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:495)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
 at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
 at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
 at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
 at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
 at java.lang.Thread.run(Thread.java:595)
Caused by: javax.mail.MessagingException: [EOF]
 at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:1363)
 at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1085)
 at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:584)
 at javax.mail.Transport.send0(Transport.java:169)
 at javax.mail.Transport.send(Transport.java:98)
 at org.apache.commons.mail.Email.sendMimeMessage(Email.java:863)
 ... 78 more

I have been looking furiously online, but I am finding nothing...

We are thinking that perhaps we aren't properly closing the HTMLEmail object (or something
along those lines) but we really aren't too sure.

If any one has any info they could give me it would be much appreciated.

Thank you very much,

--LD
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message