SmtpClient: An extension to send emails using SMTP server

bonjour j'ai ce code d'erreur quand je lance l'application avec l'extension smtp client voici le code d'erreur
com sun mail util mailconnectexception couldn t connect to host, port: stmp.gmail.com,465; timeout 10000


merci thank you

Shouldn't host be smtp.gmail.com instead of stmp.gmail.com ?

1 Like

Generate App Specific Password.

I use this code become hes not work Screenshot-2023-10-29-14-06-11-902-com-mi-globalbrowser @vknow360

You seem to be using two accounts on community.
Which one should I delete?
Only one account is allowed here.

1 Like

You should put your app name there.
Then you will get a password for your email which you can use in SmtpClient extension.

Yes but hes doesn't work

Show blocks.

2 Likes

sorry I am on phone

Remove spaces from password.

1 Like

thank it's working

HI,
here is a strange thing.
This extension (com.sunny.SmtpClient.aix) works well

And this (Beta version of a client with support for smtp, pop3 and imap - Extensions - Kodular Community) works well also.

But If I import theese two extensions in the same AppInventor Project, when I build APK I receive the following error :

App Inventor is unable to compile this project.
The compiler error output was
[ReadBuildInfo] Starting Task
[ReadBuildInfo] Task succeeded in 0.004 seconds
[LoadComponentInfo] Starting Task
[LoadComponentInfo] INFO: Generating assets...
[LoadComponentInfo] Component assets needed, n = 0
[LoadComponentInfo] INFO: Generating activities...
[LoadComponentInfo] Component activities needed, n = 0
[LoadComponentInfo] INFO: Component "com.sunny.SmtpClient.SmtpClient" does not specify activityMetadata
[LoadComponentInfo] Component activity metadata needed, n = 0
[LoadComponentInfo] INFO: Generating broadcast receivers...
[LoadComponentInfo] INFO: Component "com.sunny.SmtpClient.SmtpClient" does not specify broadcastReceivers
[LoadComponentInfo] INFO: Component "com.sunny.SmtpClient.SmtpClient" does not specify services
[LoadComponentInfo] Component content providers needed, n = 0
[LoadComponentInfo] INFO: Generating libraries...
[LoadComponentInfo] INFO: Component "com.sunny.SmtpClient.SmtpClient" does not specify libraries
[LoadComponentInfo] Libraries needed, n = 0
[LoadComponentInfo] INFO: Component "com.sunny.SmtpClient.SmtpClient" does not specify metadata
[LoadComponentInfo] Component metadata needed, n = 0
[LoadComponentInfo] INFO: Generating Android minimum SDK...
[LoadComponentInfo] INFO: Generating native libraries...
[LoadComponentInfo] INFO: Component "com.sunny.SmtpClient.SmtpClient" does not specify native
[LoadComponentInfo] Native Libraries needed, n = 0
[LoadComponentInfo] INFO: Generating permissions...
[LoadComponentInfo] INFO: Component "com.google.appinventor.components.runtime.Button" does not specify permissionConstraints
[LoadComponentInfo] INFO: Component "com.google.appinventor.components.runtime.Form" does not specify permissionConstraints
[LoadComponentInfo] INFO: Component "com.google.appinventor.components.runtime.Notifier" does not specify permissionConstraints
[LoadComponentInfo] INFO: Component "com.extensions.mailer.mailer" does not specify permissionConstraints
[LoadComponentInfo] INFO: Component "com.sunny.SmtpClient.SmtpClient" does not specify permissionConstraints
[LoadComponentInfo] usesLocation = False
[LoadComponentInfo] Permissions needed, n = 6
[LoadComponentInfo] INFO: Component "com.sunny.SmtpClient.SmtpClient" does not specify queries
[LoadComponentInfo] INFO: Component "com.sunny.SmtpClient.SmtpClient" does not specify services
[LoadComponentInfo] Component services needed, n = 0
[LoadComponentInfo] INFO: Generating component broadcast receivers...
[LoadComponentInfo] INFO: Component "com.sunny.SmtpClient.SmtpClient" does not specify broadcastReceiver
[LoadComponentInfo] Task succeeded in 0.003 seconds
[PrepareAppIcon] Starting Task
[PrepareAppIcon] INFO: Creating mipmap dirs...
[PrepareAppIcon] INFO: Generating icons...
[PrepareAppIcon] Generating icons for mipmap-mdpi
[PrepareAppIcon] Generating icons for mipmap-hdpi
[PrepareAppIcon] Generating icons for mipmap-xhdpi
[PrepareAppIcon] Generating icons for mipmap-xxhdpi
[PrepareAppIcon] Generating icons for mipmap-xxxhdpi
[PrepareAppIcon] Task succeeded in 1.034 seconds
[XmlConfig] Starting Task
[XmlConfig] INFO: Creating animation xml
[XmlConfig] Creating zoom_enter.xml
[XmlConfig] Creating fadeout.xml
[XmlConfig] Creating slide_v_exit.xml
[XmlConfig] Creating fadein.xml
[XmlConfig] Creating zoom_exit.xml
[XmlConfig] Creating slide_v_enter.xml
[XmlConfig] Creating zoom_exit_reverse.xml
[XmlConfig] Creating slide_v_enter_reverse.xml
[XmlConfig] Creating zoom_enter_reverse.xml
[XmlConfig] Creating slide_enter_reverse.xml
[XmlConfig] Creating slide_exit.xml
[XmlConfig] Creating hold.xml
[XmlConfig] Creating slide_enter.xml
[XmlConfig] Creating slide_v_exit_reverse.xml
[XmlConfig] Creating slide_exit_reverse.xml
[XmlConfig] INFO: Creating style xml
[XmlConfig] INFO: Creating provider_path xml
[XmlConfig] INFO: Creating network_security_config xml
[XmlConfig] INFO: Generating adaptive icon file
[XmlConfig] INFO: Generating round adaptive icon file
[XmlConfig] INFO: Generating adaptive icon background file
[XmlConfig] Task succeeded in 0.005 seconds
[CreateManifest] Starting Task
[CreateManifest] INFO: Reading project specs...
[CreateManifest] VCode: 1
[CreateManifest] VName: 1.0
[CreateManifest] Min SDK 7
[CreateManifest] INFO: Writing screen 'appinventor.ai_MEngeneeringSoft.test.Screen1'
[CreateManifest] Task succeeded in 0.001 seconds
[AttachNativeLibs] Starting Task
[AttachNativeLibs] Task succeeded in 0.001 seconds
[AttachAarLibs] Starting Task
[AttachAarLibs] Task succeeded in 0.147 seconds
[AttachCompAssets] Starting Task
[AttachCompAssets] Task succeeded in 0.0 seconds
[MergeResources] Starting Task
[MergeResources] Task succeeded in 0.187 seconds
[SetupLibs] Starting Task
[SetupLibs] Task succeeded in 0.0 seconds
[RunAapt] Starting Task
[RunAapt] Task succeeded in 1.078 seconds
[GenerateClasses] Starting Task
[GenerateClasses] INFO: Source File: appinventor/ai_MEngeneeringSoft/test/Screen1.yail
[GenerateClasses] INFO: Libraries Classpath = /tmp/kawa14430904559987051491.jar:/tmp/acra-4.4.016025788103075594573.jar:/tmp/AndroidRuntime6396292337397046335.jar:/tmp/annotation15151089721230234637.jar:/tmp/appcompat14668847606429358294.jar:/tmp/asynclayoutinflater9119768465536347931.jar:/tmp/collection9523907344207378760.jar:/tmp/constraintlayout5656875781798986064.jar:/tmp/constraintlayout-solver12009542873001190667.jar:/tmp/coordinatorlayout13471813293311346194.jar:/tmp/core4421175550982182960.jar:/tmp/core-common7471677780342546113.jar:/tmp/core-runtime4204067157388899548.jar:/tmp/cursoradapter17266232117237984981.jar:/tmp/customview9934000267818423690.jar:/tmp/documentfile2742022634974158137.jar:/tmp/drawerlayout18382536538027305663.jar:/tmp/fragment16575831644461123192.jar:/tmp/interpolator4733235653951151710.jar:/tmp/legacy-support-core-ui17330251947010680501.jar:/tmp/legacy-support-core-utils6461804189798844635.jar:/tmp/lifecycle-common7340521212086009762.jar:/tmp/lifecycle-livedata17274370572860772242.jar:/tmp/lifecycle-livedata-core37918082115507543.jar:/tmp/lifecycle-runtime7183209453587174167.jar:/tmp/lifecycle-viewmodel1683954302182743016.jar:/tmp/loader9980771125246669939.jar:/tmp/localbroadcastmanager3300570227200941923.jar:/tmp/print1850880803855288499.jar:/tmp/slidingpanelayout3546318899156139132.jar:/tmp/swiperefreshlayout9463180426941671576.jar:/tmp/vectordrawable14991978358436672169.jar:/tmp/vectordrawable-animated8353441811919672951.jar:/tmp/versionedparcelable16202160568008895532.jar:/tmp/viewpager4742981029216600321.jar:/tmp/1709543637110_0.37947906770362616-0/youngandroidproject/../assets/external_comps/com.extensions.mailer/files/AndroidRuntime.jar:/tmp/1709543637110_0.37947906770362616-0/youngandroidproject/../assets/external_comps/com.sunny.SmtpClient/files/AndroidRuntime.jar:/tmp/1709543637110_0.37947906770362616-0/youngandroidproject/../build/classes:/tmp/android15719098352250866307.jar
(compiling appinventor/ai_MEngeneeringSoft/test/Screen1.yail to appinventor.ai_MEngeneeringSoft.test.Screen1)
(compiling /tmp/runtime9054948932806499556.scm to com.google.youngandroid.runtime)
[GenerateClasses] Task succeeded in 10.314 seconds
[RunD8] Starting Task
[RunD8] INFO: Using pre-dexed dex-cached-a565821fcfb40dd06856c57f2784936e.dex <- /tmp/AndroidRuntime6396292337397046335.jar
[RunD8] INFO: Using pre-dexed dex-cached-4afd1465d334dee94ac700edb0374a45.dex <- /tmp/kawa14430904559987051491.jar
[RunD8] INFO: Using pre-dexed dex-cached-558104d32e109ad96655ecbe9fe4e39f.dex <- /tmp/annotation15151089721230234637.jar
[RunD8] INFO: Using pre-dexed dex-cached-ef239d31d31d166f7410d71e14db1a68.dex <- /tmp/swiperefreshlayout9463180426941671576.jar
[RunD8] INFO: Using pre-dexed dex-cached-de87276390f7a8c71064f3e7908c143b.dex <- /tmp/core-common7471677780342546113.jar
[RunD8] INFO: Using pre-dexed dex-cached-c950a9845cca4523f19bc2fc922b41bf.dex <- /tmp/legacy-support-core-utils6461804189798844635.jar
[RunD8] INFO: Using pre-dexed dex-cached-35076b6f638faca00c217e98a0385344.dex <- /tmp/interpolator4733235653951151710.jar
[RunD8] INFO: Using pre-dexed dex-cached-bee920fd1e059913bf2d820dbb234720.dex <- /tmp/lifecycle-common7340521212086009762.jar
[RunD8] INFO: Using pre-dexed dex-cached-1e4d689047e2ee2cc76b7203626e9c33.dex <- /tmp/customview9934000267818423690.jar
[RunD8] INFO: Using pre-dexed dex-cached-74360288e1016af9d6afdd39a2caa1b8.dex <- /tmp/asynclayoutinflater9119768465536347931.jar
[RunD8] INFO: Using pre-dexed dex-cached-d53c4c8eedbf41663110b03a33fe9914.dex <- /tmp/lifecycle-runtime7183209453587174167.jar
[RunD8] INFO: Using pre-dexed dex-cached-032c68a2c5e93c1baac1524e105bbe88.dex <- /tmp/collection9523907344207378760.jar
[RunD8] INFO: Using pre-dexed dex-cached-91b7d1f3cb5fd0fd2f3a4c939316139b.dex <- /tmp/versionedparcelable16202160568008895532.jar
[RunD8] INFO: Using pre-dexed dex-cached-16ea1fc3b7e49139559eafccec2708ab.dex <- /tmp/lifecycle-viewmodel1683954302182743016.jar
[RunD8] INFO: Using pre-dexed dex-cached-84637f838557e65ad5856467fd22316c.dex <- /tmp/print1850880803855288499.jar
[RunD8] INFO: Using pre-dexed dex-cached-a9e803bf51318b35fcaf603f59f25f7c.dex <- /tmp/vectordrawable14991978358436672169.jar
[RunD8] INFO: Using pre-dexed dex-cached-b73957ec00af79319f56aedf27dff3fc.dex <- /tmp/core-runtime4204067157388899548.jar
[RunD8] INFO: Using pre-dexed dex-cached-e3991bb5e40b91eb1bbb1ae83bde23b2.dex <- /tmp/core4421175550982182960.jar
[RunD8] INFO: Using pre-dexed dex-cached-e890ce7827a13b8714afbb241f7e89b2.dex <- /tmp/lifecycle-livedata-core37918082115507543.jar
[RunD8] INFO: Using pre-dexed dex-cached-81757b9148a3984b5874ef1fd300acdb.dex <- /tmp/documentfile2742022634974158137.jar
[RunD8] INFO: Using pre-dexed dex-cached-b83403f2b639cc6e7a6f9c0681d69367.dex <- /tmp/viewpager4742981029216600321.jar
[RunD8] INFO: Using pre-dexed dex-cached-c2a16bb02f51a6fcd1ff46dd1a78d0bf.dex <- /tmp/slidingpanelayout3546318899156139132.jar
[RunD8] INFO: Using pre-dexed dex-cached-2eabb48fdf784357d984acbda18ea6a3.dex <- /tmp/appcompat14668847606429358294.jar
[RunD8] INFO: Using pre-dexed dex-cached-7a5a85c38b934be86a121ca9b5e7477b.dex <- /tmp/vectordrawable-animated8353441811919672951.jar
[RunD8] INFO: Using pre-dexed dex-cached-a3a712d1d179d231b40a977ed5593202.dex <- /tmp/lifecycle-livedata17274370572860772242.jar
[RunD8] INFO: Using pre-dexed dex-cached-9b1768a7734de4eaf5a635a007ad4b25.dex <- /tmp/coordinatorlayout13471813293311346194.jar
[RunD8] INFO: Using pre-dexed dex-cached-d3d338969c3cd4ad53a888753da3b580.dex <- /tmp/cursoradapter17266232117237984981.jar
[RunD8] INFO: Using pre-dexed dex-cached-a116e0a41475b6522ae295f7cc4ff4b3.dex <- /tmp/legacy-support-core-ui17330251947010680501.jar
[RunD8] INFO: Using pre-dexed dex-cached-a07a23b88daaae0b48cdd25378e03b03.dex <- /tmp/localbroadcastmanager3300570227200941923.jar
[RunD8] INFO: Using pre-dexed dex-cached-bb8901219e7be6c576cc65e75503d7fa.dex <- /tmp/fragment16575831644461123192.jar
[RunD8] INFO: Using pre-dexed dex-cached-fca718e99e97cb52f4c8c0ada2c74e72.dex <- /tmp/drawerlayout18382536538027305663.jar
[RunD8] INFO: Using pre-dexed dex-cached-ccb6f0c5e0adc11059c3d609a2fd15d6.dex <- /tmp/loader9980771125246669939.jar
[RunD8] INFO: Using pre-dexed dex-cached-c0e4dda29672c028ea3ce0e3785040de.dex <- /tmp/constraintlayout5656875781798986064.jar
[RunD8] INFO: Using pre-dexed dex-cached-85f46a2fd295a23f59a391cccd7a11c8.dex <- /tmp/constraintlayout-solver12009542873001190667.jar
[RunD8] ERROR: d8 failed.
[RunD8] Task errored in 2.213 seconds

What is the problem ?

Thank you

I am not sure that why do you need both extensions in same project.

Probably both extensions use the same library, which results in a conflict
Use only one email extension

Taifun

Hi,
I need your extension to send emails through SMTP and another extension to receive email through POP3 or IMAP.
The second extension (Beta version of a client with support for smtp, pop3 and imap - Extensions - Kodular Community) can send emails but there is a bug : it does't accept - in the email fields. (for example mydomain-app.com)

So it is impossibile to import two extensions using the same library ?

You can purchase my extension for receiving emails.

If not then contact developer of the other extension.

The developer posted on kodular forum two years ago...........

Exactly, this is a limitation
Taifun

Ok I'use only one "mail" extension. thank you