Yes, with this changed it works great! Thanks for your help! -Dave
On Wed, Jul 6, 2011 at 8:07 AM, Siegfried Goeschl <[email protected]> wrote: > Hi David, > > the following snippet might help if you update it accordingly - this are the > exclude I'm using for one of my projects. > > If it works please don't hesitate to send a success message - we all love to > hear when something works ... ;-) > > Cheers, > > Siegfried Goeschl > > <!-- Apache CXF --> > <dependency> > <groupId>org.apache.cxf</groupId> > <artifactId>cxf-rt-frontend-jaxws</artifactId> > <version>${it20one.cxf.version}</version> > <exclusions> > <exclusion> > <groupId>org.apache.geronimo.specs</groupId> > <artifactId>geronimo-javamail_1.4_spec</artifactId> > </exclusion> > <exclusion> > <groupId>org.apache.geronimo.specs</groupId> > <artifactId>geronimo-activation_1.1_spec</artifactId> > </exclusion> > </exclusions> > </dependency> > <dependency> > <groupId>org.apache.cxf</groupId> > <artifactId>cxf-rt-transports-http</artifactId> > <version>${it20one.cxf.version}</version> > <exclusions> > <exclusion> > <groupId>org.apache.geronimo.specs</groupId> > <artifactId>geronimo-javamail_1.4_spec</artifactId> > </exclusion> > <exclusion> > <groupId>org.apache.geronimo.specs</groupId> > <artifactId>geronimo-activation_1.1_spec</artifactId> > </exclusion> > </exclusions> > </dependency> > > > On 06.07.11 15:31, David Hoffer wrote: > > Or can/should I configure commons-email to use geronimo? > > -Dave > > On Wed, Jul 6, 2011 at 7:25 AM, David Hoffer <[email protected]> wrote: >> >> I didn't think so at first...but yes I do have >> geronimo-javamail_1.4_spec-1.3.jar & geronimo-activation_1.1_spec-1.0.2.jar >> plus a bunch of other geronimo-xxx jars. I'm not sure where these came from >> but I do use CXF (web service) so I'm guessing geronimo is used by CXF. >> Also I have activation-1.1.jar and mail-1.4.1.jar used by >> commons-email-1.2.jar. >> >> Is that the problem that I have two mail jars? Can I safely exclude the >> geronimo-javamail_1.4_spec-1.3.jar & geronimo-activation_1.1_spec-1.0.2.jar >> from CXF's dependencies? >> >> Thanks, >> -Dave >> >> On Wed, Jul 6, 2011 at 6:58 AM, Siegfried Goeschl >> <[email protected]> wrote: >>> >>> More specifically - do you have the geronimo mail libraries in your >>> classpath? >>> >>> Cheers, >>> >>> Siegfried Goeschl >>> >>> On 06.07.11 14:28, James Carman wrote: >>>> >>>> Are you sure you have a clean classpath? >>>> >>>> Sent from my Android device. Please excuse typos and brevity. >>>> On Jul 6, 2011 8:12 AM, "David Hoffer"<[email protected]> wrote: >>>>> >>>>> I've had another email failure this time it's usage with no attachment. >>>>> I'll paste the code below. It's dropping the subject...same as the >>>>> other >>>>> case. Note that (No Subject) is being added by GMail on the receiving >>>>> side >>>>> as all emails with no subject show that. >>>>> >>>>> try { >>>>> Email email = new SimpleEmail(); >>>>> email.setHostName("smtp.gmail.com"); >>>>> email.setSmtpPort(587); >>>>> final String gMailUsername = appProperties.getGMailUsername(); >>>>> email.setAuthenticator(new DefaultAuthenticator(gMailUsername, >>>>> appProperties.getGMailPassword())); >>>>> email.setTLS(true); >>>>> email.setFrom(gMailUsername); >>>>> email.setSubject("App System Error"); >>>>> email.setMsg(msg); >>>>> String[] toEmails = appProperties.getSystemErrorSendToEmails(); >>>>> for (String toEmail : toEmails) { >>>>> email.addTo(toEmail); >>>>> } >>>>> email.send(); >>>>> } catch (EmailException e) { >>>>> log.error("Failed to send system email", e); >>>>> } >>>>> >>>>> Thanks, >>>>> -Dave >>>>> >>>>> >>>>> On Wed, Jul 6, 2011 at 3:08 AM, Siegfried Goeschl< >>>>> [email protected]> wrote: >>>>> >>>>>> Hi David, >>>>>> >>>>>> that sound a little bit strange - can you have a look at the JUnit >>>>>> tests? >>>>>> There is an "EmailLiveTest" which allows sending real emails with a >>>>>> bit >>>> >>>> of >>>>>> >>>>>> tinkering - I suggest to have a look at the test, configure them to >>>>>> send >>>>>> test emails to your email account and then double-check your >>>>>> production >>>>>> code. >>>>>> >>>>>> Cheers, >>>>>> >>>>>> Siegfried Goeschl >>>>>> >>>>>> >>>>>> On 06.07.11 05:46, David Hoffer wrote: >>>>>> >>>>>>> I have a strange problem. I've used commons-email for a while now >>>>>>> with good success but now all of the sudden it isn't working right >>>>>>> and >>>>>>> I don't know why. The emails have 3 problems: >>>>>>> >>>>>>> 1. Although I attach a file to the email as an attachment it is >>>>>>> received inline as base64 encoded text. I.e. my code does this: >>>>>>> attachment.setDisposition(**EmailAttachment.ATTACHMENT); >>>>>>> >>>>>>> 2. The subject is replaced with this: (no subject) >>>>>>> >>>>>>> 3. The from and reply to email addresses are dropped and replaced >>>>>>> with >>>>>>> the email address used in as the authenticator. >>>>>>> >>>>>>> This is only a problem when I run the code on the production server >>>>>>> which is Linux (hosted virtual server). It works as expected on >>>>>>> Windows during test. This code on the Linux server used to work but >>>>>>> it was a prior build, not sure what changed but nothing in the email >>>>>>> code changed...just a different file being sent with different >>>>>>> description. >>>>>>> >>>>>>> Any ideas why these three things might be occurring? >>>>>>> >>>>>>> -Dave >>>>>>> >>>>>>> >>>> >>>> ------------------------------**------------------------------**--------- >>>>>>> >>>>>>> To unsubscribe, e-mail: user-unsubscribe@commons.**apache.org< >>>> >>>> [email protected]> >>>>>>> >>>>>>> For additional commands, e-mail: [email protected] >>>>>>> >>>>>>> >>>>>> >>>>>> ------------------------------**------------------------------**--------- >>>>>> To unsubscribe, e-mail: user-unsubscribe@commons.**apache.org< >>>> >>>> [email protected]> >>>>>> >>>>>> For additional commands, e-mail: [email protected] >>>>>> >>>>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [email protected] >>> For additional commands, e-mail: [email protected] >>> >> > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
