1

I'm new to android, I was following a tutorial on how to send an Email using JavaMail API, I have add the necessary Jars properly but I always face the Cannot resolve symbol provider on the GmailSender Class, I tried removing and adding the jars but the problem still persist.

  static {
        Security.addProvider(new com.provider.JSSEProvider());
    }

am I missing something ? i am working on androidStudio by the way.

2 Answers2

1

The above answer isn't incorrect, just not very straightforward... so let me elaborate on what Sharath is saying.

Assume for a moment that your package name is "com.mycompany.projectname"

Change this:

  static {
    Security.addProvider(new com.provider.JSSEProvider());
  }

To this:

  static {
    Security.addProvider(new com.mycompany.projectname.JSSEProvider());
  }
0

Hey i had the same problem. We have to add our package in there. Just copy package on the top of your class. Like package com.myapplication3.JSSEProvider(); Hope it helps!

Sharath
  • 691
  • 8
  • 23