Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for android 11(30) #54

Open
AlenToma opened this issue Oct 20, 2021 · 16 comments
Open

Support for android 11(30) #54

AlenToma opened this issue Oct 20, 2021 · 16 comments

Comments

@AlenToma
Copy link

The app crash when I build it for API 30 and running it on android 11.

The jar files are not supported anymore.

I have fixed my fork but wanted to tell anyone who is having the same issue, or maybe you would like to have a look at the changes I did.

On android build.grade I removed implementation fileTree(dir: 'libs', include: '*.jar') and added

    implementation 'com.sun.mail:android-mail:1.6.6'
    implementation 'com.sun.mail:android-activation:1.6.6'

I also added the following options under android.

   packagingOptions {
		exclude 'META-INF/mimetypes.default'
		exclude 'META-INF/mailcap.default'
	}

All the credit goes for the following site https://issuetracker.google.com/issues/172544275?pli=1
I found the solution there.

@mrkprdo
Copy link

mrkprdo commented Oct 20, 2021

Will this fix this error?

Rejecting class com.sun.mail.handlers.text_plain that attempts to sub-type erroneous class com.sun.mail.handlers.handler_base

@AlenToma
Copy link
Author

AlenToma commented Oct 20, 2021

Yes, its exactly the error that it fixes

@mrkprdo
Copy link

mrkprdo commented Oct 20, 2021

Yes, its exactly the error that it fixes

I tried your solution but still did not work on my end.
Any thoughts whats causing this error?

@AlenToma
Copy link
Author

It did work for me, try and install my fork and test it npm install https://github.com/AlenToma/react-native-smtp-mailer.git
As for why, you can read about this here https://issuetracker.google.com/issues/172544275?pli=1

@mrkprdo
Copy link

mrkprdo commented Oct 26, 2021

Ok, got it to work. As i later understand that changes should be applied to the library build.gradle, not the main app build.gradle.
Thanks!

@DDAmine
Copy link

DDAmine commented Nov 3, 2021

@AlenToma hi , it used to work fine on android <android 11
but since i applied the changes i keep getting back an error of Authentication failed, i did check my id and pw over 20 time no clue what could be the problem

@AlenToma
Copy link
Author

AlenToma commented Nov 3, 2021

There is a setiings you have configurate on Gmail. if you are using it on with Gmail. Other wise i have no idea why.

@DDAmine
Copy link

DDAmine commented Nov 3, 2021

@AlenToma my bad all good , u are a lifesaver , just to clarify
you add the code below in the project-name/android/app/build.gradle

   packagingOptions {
		exclude 'META-INF/mimetypes.default'
		exclude 'META-INF/mailcap.default'
	}

and you add this code in node_modules/react-native-smtp-mailer/android/build.grade

    implementation 'com.sun.mail:android-mail:1.6.6'
    implementation 'com.sun.mail:android-activation:1.6.6'

@supawitbeat
Copy link

It did work for me, try and install my fork and test it npm install https://github.com/AlenToma/react-native-smtp-mailer.git As for why, you can read about this here https://issuetracker.google.com/issues/172544275?pli=1

It's Worked! thank you .

@IsharaJaylath
Copy link

I am getting Error:IO Exception while sending message without attaching any file or document. Ive use npm install https://github.com/AlenToma/react-native-smtp-mailer.git this fork.

@kd-fs
Copy link

kd-fs commented Jan 26, 2023

Hi, When I build, I [have this error: Task :app:mergeDebugJavaResource FAILED

image_2023-01-26_110148794

How solve this plese ?

@kd-fs
Copy link

kd-fs commented Jan 26, 2023

I solve this by replace.

packagingOptions {
exclude 'META-INF/mimetypes.default'
exclude 'META-INF/mailcap.default'
}

with

packagingOptions {
resources.excludes.add("META-INF/*")
}

@kd-fs
Copy link

kd-fs commented Jan 26, 2023

I am getting Error:IO Exception while sending message without attaching any file or document. Ive use npm install https://github.com/AlenToma/react-native-smtp-mailer.git this fork.

I have same error.

@kd-fs
Copy link

kd-fs commented Jan 26, 2023

when I attach the file it doesn't work either.

@markusgabriel
Copy link

I am using this in a managed expo project. Should I prebuild the project and then make the changes in these files? Or should I write a config plugin for it? I know I probably should ask this in an expo thread, but I think I'm not the only one with that setup while using this tool.

@dhavalsigma
Copy link

Exception

I am also getting the same error, any one have a solution?
[Error: IOException while sending message]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants