One Tap eMail

luke2012

Well-Known Member
Licensed User
Longtime User
Goodmorning community!
It's possible to send an email using only one tap (send button only) ?

Actually I'm using the intent to send email but the user have to do 2 taps in order to send an email.
It's a nice to have but in certain apps it's important because improve the productivity.

Thanks in advance!
 

timo

Active Member
Licensed User
Longtime User
There is a sample about it ?

For some reason, it seems to work fine with gmail and not very well with other accounts.
B4X:
'Process_Globals:
Dim SMTP1 As SMTP
Dim server As String    : server= "smtp.gmail.com"
Dim port As Int      : port= 465
Dim emailname As String   : emailname="yourGmailAdress"
Dim password As String   : password="yourpassword"
Dim protocol As String   : protocol="SMTP"
'create
SMTP1.Initialize(server, port, emailname, password, protocol)
SMTP1.UseSSL = True
' sub send:
SMTP1.To.Add (destEmailAdress) 
SMTP1.Subject = "someSubject"
SMTP1.Body = "someText"
SMTP1.AddAttachment(File.DirDefaultExternal, "examle.txt")
SMTP1.Send
 
Last edited:
Upvote 0

Mahares

Expert
Licensed User
Longtime User
Can you encrypt or hide the password in the code? It is exposed in the code for anyone to see. Is this a safe way to send a one touch email? Wouldn't you rather have a couple of steps and protect your password or expose it just to save another click. There are other methods.
 
Upvote 0

jhoward15

New Member
Licensed User
Longtime User
Compile encrypted?

Vars are in process globals and you won't see them if you compile encrypted
Newbie question - how do you "compile encrypted"? Can you explain this a bit more? I'm looking to do the same thing and hide the email account password. Thanks.
 
Upvote 0

rfresh

Well-Known Member
Licensed User
Longtime User
What lib do I need? I don't see an SMTP Lib in the list.

Thanks...

-------------------------
I found it...the .Net lib.

Ver 1.20 is the latest?
 
Last edited:
Upvote 0

melamoud

Active Member
Licensed User
Longtime User
how was that resolve, I started to see this as well, it was working fine until yesterday, not sure what I did.
I see this
B4X:
11-14 17:19:21.007 20198 20198 I B4A     : MCalls: errror sending mail:java.lang.RuntimeException: Empty writer returned: 530-5.5.1 Authentication Required. Learn more at
11-14 17:19:21.007 20198 20198 I B4A     : 530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257 pb2sm2469551qeb.0
 
Upvote 0

luke2012

Well-Known Member
Licensed User
Longtime User
Saving password to SQLite record

I wish save the user password in an SQLite db.
There is a safe method to do this ?
 
Upvote 0

luke2012

Well-Known Member
Licensed User
Longtime User
For some reason, it seems to work fine with gmail and not very well with other accounts.
B4X:
'Process_Globals:
Dim SMTP1 As SMTP
Dim server As String    : server= "smtp.gmail.com"
Dim port As Int      : port= 465
Dim emailname As String   : emailname="yourGmailAdress"
Dim password As String   : password="yourpassword"
Dim protocol As String   : protocol="SMTP"
'create
SMTP1.Initialize(server, port, emailname, password, protocol)
SMTP1.UseSSL = True
' sub send:
SMTP1.To.Add (destEmailAdress) 
SMTP1.Subject = "someSubject"
SMTP1.Body = "someText"
SMTP1.AddAttachment(File.DirDefaultExternal, "examle.txt")
SMTP1.Send

can I use other providers ? Or this script works only for GMAIL ?
 
Upvote 0
Top