SmtpClient: An extension to send emails using SMTP server

Unfortunately I do not know, about which extension you are ttalking about, but you are invited to test my paid mail extension App Inventor Extensions: Mail | Pura Vida Apps here

https://play.google.com/apps/testing/appinventor.ai_taifunbaer.smtp

For Gmail accounts you need an application specific password, which you can get following these steps Sign in with app passwords - Google Account Help

Taifun

Well, i use the Smtp extention from "vknow360" and on Android 4.4.2 it crashes with the following screen.
Seems thats java.mail doesn't support the old android version. (on android >=9 everything is ok.)


9c040
Ididn't try your solution, but i think because both are based on the same java lib, the result should be the same.
Greetings
Thomas

I now moved your contribution into the correct thread

This is your decision
You also could try another of the many email solutions

Taifun

I am using the SMTP CLIENT extension to send notification emails using my SMTP server, and it works perfectly on the companion app, but when I export it to the apk, it doesn't work; the screen closes when I click “send.”

It works fine on the companion app, but not on the apk.

You can use logcat and try to find out what happens in apk

I’m getting a crash when calling my email-sharing function. The app throws:

java.util.ServiceConfigurationError: javax.mail.Provider: Provider com.sun.mail.imap.IMAPProvider not found
Caused by: ClassNotFoundException: com.sun.mail.imap.IMAPProvider

This happens when javax.mail.Session.getInstance() is created (Jakarta Mail 1.6.7 is logged). It looks like the extension package is missing the IMAP provider classes/resources (e.g., com.sun.mail.imap.IMAPProvider and/or the META-INF/services/javax.mail.Provider entries), so JavaMail fails while loading providers and crashes the app.

Which Android device and Android version are you using for your tests?
Does it work on another device?

Taifun

I tested it on different devices:

  • Galaxy A56 Android 15

  • Infinix Note 50 Android 15

  • Galaxy S24 Android 16

  • LDPlayer Emulator

  • Testing using ADB-Tool too

Which of the 2 versions are you using?

Try the version with dependencies
Taifun