How can it be a bug in JavaMail? Release 1.4.1 has been out since October 22, 2007. I'm sure any problems would have been noticed and resolved by now. Likewise Commons Email 1.1 was release around Sept 2007.
I can't imagine this is a bug... The whole situation is strange. On Fri, Nov 28, 2008 at 1:39 PM, sebb <[EMAIL PROTECTED]> wrote: > On 28/11/2008, Robert Campbell <[EMAIL PROTECTED]> wrote: >> Hello, >> >> I am using Commons Email 1.1 with JavaMail 1.4.1 and Activation Framework >> 1.1.1 >> >> The only documentation I found online about this error was one guy who >> had a corrupted jar file. I've redownloaded all three jars multiple >> times and I always get the same error. Not sure if there is a checksum >> available for them, but I doubt this is the problem... unless a bad >> build somehow got published. >> >> When I try to send an e-mail I get the following error (the actual >> host is valid and tested via telnet to port 25, xxx here): >> >> Caused by: >> com.idc.cms.content.syndication.transports.SyndicationTransportException: >> org.apache.commons.mail.EmailException: Sending the email to the >> following server failed : relay.xxx.com:25 >> at >> com.idc.cms.content.syndication.transports.EmailTransporter.sendOne(EmailTransporter.java:110) >> at >> com.idc.cms.content.syndication.transports.PartnerEmailTransporter.send(PartnerEmailTransporter.java:55) >> at >> com.idc.cms.content.syndication.transports.PartnerEmailTransporter.send(PartnerEmailTransporter.java:43) >> at >> com.idc.cms.content.syndication.transports.PartnerTransportManager.deliverFileToPartnerViaEmail(PartnerTransportManager.java:79) >> ... 26 more >> Caused by: org.apache.commons.mail.EmailException: Sending the email >> to the following server failed : relay.xxx.com:25 >> at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1138) >> at org.apache.commons.mail.Email.send(Email.java:1163) >> at >> com.idc.cms.content.syndication.transports.EmailTransporter.sendOne(EmailTransporter.java:107) >> ... 29 more >> Caused by: java.lang.NoSuchMethodError: >> >> com.sun.mail.util.SocketFetcher.getSocket(Ljava/lang/String;ILjava/util/Properties;Ljava/lang/String;Z)Ljava/net/Socket; > > Have you tried using Eclipse to look at the jar to see if the > SocketFetcher class exists? > And if so, what the method names and parameters are? > > I just did this for my copy of Javamail 1.4.1 and the class exists, > but the getSocket methods are: > > getSocket(String, int, Properties, String) > getSocket(String, int, Properties, String, boolean) > > whereas the code is looking for > > getSocket(String, Properties, String) > > Looks like a bug in the Javamail code, as this method is called by > other Javamail routines. > > Commons Mail only provides classes in the org.apache.commons.mail package. > > Make sure you don't have multiple copies of the mail jar on the path. > >> at >> com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1359) >> at >> com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:412) >> at javax.mail.Service.connect(Service.java:233) >> at javax.mail.Service.connect(Service.java:134) >> at javax.mail.Service.connect(Service.java:86) >> at javax.mail.Transport.send0(Transport.java:162) >> at javax.mail.Transport.send(Transport.java:80) >> at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1128) >> ... 31 more >> >> The code: >> >> >> // Create the email message >> MultiPartEmail email = new MultiPartEmail(); >> email.setHostName(host); >> email.setSubject(subject); >> >> // Finish the configuration >> email.addTo(emailAccount.getAddress(), >> emailAccount.getName()); >> email.setFrom(fromAddress, fromName); >> email.setMsg(body); >> >> // Add the attachment >> email.attach(createAttachment(file)); >> >> // Send the email >> email.send(); >> >> --------------------------------------------------------------------- >> 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] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
