Hi,
I'm probably missing something ...
and
When I uncomment fx.ShowExternalDocument(...) and ExitApplication .... the email is not sent (at least not received ...)
My mistake is probably in the 'wait for' instruction ....
thanks in advance
p
I'm probably missing something ...
B4X:
Private Sub sendGmail(nbl As Int)
If (File.Exists(xui.DefaultFolder,"gabuzomeu.dat") = False) Then Return
Private localSmtp As String = kvs.Get("smtp")
Private localPort As String = kvs.Get("port")
Private localCompte As String = kvs.Get("compte")
Private localPass As String = kvs.Get("pass")
Private localService As String = kvs.Get("service")
Private localUtilisation As String = kvs.Get("utilisations")
Dim SMTP1 As SMTP
SMTP1.Initialize(localSmtp, localPort, localCompte, localPass,localService)
SMTP1.StartTLSMode = False
SMTP1.UseSSL= True
SMTP1.To.Add("[email protected]")
SMTP1.HtmlBody = True
SMTP1.Subject="Utilisation de Gabuzomeu par "&GetSystemProperty("user.name","")
SMTP1.Body="Le fichier/devis utilisé est : "&fichierXL&" - "&nbl&" ligne(s) traitée(s)<br/>C'est la "&localUtilisation&"ème utilisation sur ce poste."
'SMTP1.AddAttachment("chemin","fichier")
Try
Wait For (SMTP1.Send) Complete (Success As Boolean)
Catch
Log(LastException)
End Try
End Sub
and
B4X:
... some woking code before ....
Try
classeur.Save(travailDir,fichierXL) ' on sauvegarde les modifications
classeur.Close ' on ferme le classeur
txtUtilisations.Text = txtUtilisations.Text +1
kvs.Put("utilisations",txtUtilisations.Text)
sendGmail(cptLigneLocal)
'fx.ShowExternalDocument(File.GetUri(travailDir, fichierXL)) ' on ouvre directement (dans Excel) le fichier
'ExitApplication ' terminato la fiesta !
Catch
Log(LastException)
toast.Show("Le sommaire ne doit pas être ouvert dans Excel ...")
End Try
When I uncomment fx.ShowExternalDocument(...) and ExitApplication .... the email is not sent (at least not received ...)
My mistake is probably in the 'wait for' instruction ....
thanks in advance
p