0

I'm trying to make my first kotlin service and want it to send emails. I'm following this tutorial https://odalinjo.wordpress.com/2017/06/06/sending-mail-via-gmail-using-kotlin-and-commons-mail-library/, but I'm getting the following error....I'm not really sure what it even means?

 java.lang.NoSuchMethodError: com.sun.mail.util.TraceInputStream.<init>(Ljava/io/InputStream;Lcom/sun/mail/util/MailLogger;

Any help is appreciated.

RoflWaffle17
  • 171
  • 4
  • 14
  • Have a look at [How do I fix a NoSuchMethodError?](https://stackoverflow.com/questions/35186/how-do-i-fix-a-nosuchmethoderror). In short: you may have compiled your code against another version of the library that you are actually using at runtime or the libraries you use don't match the required dependencies. – Roland Aug 23 '18 at 08:32

1 Answers1

1

Somehow you've got the wrong JavaMail jar files included in your project. You only want the javax.mail.jar file, as described on the JavaMail web site.

Bill Shannon
  • 29,579
  • 6
  • 38
  • 40