Page 1 of 1
How to send an email from the app?
Posted: Wed Feb 16, 2022 5:00 pm
by liveCode
I'm trying to send an email from an app and I'm not succeeding!
Maybe someone can help me?
(I do not want the email sending button to lead to an application that sends the email like the REVMAIL command but LIVECODE will send the email)
Thank you
Re: How to send an email from the app?
Posted: Wed Feb 16, 2022 5:17 pm
by Klaus
Hi liveCode,
if you are using a commercial version of LC (Indy or Business) then you can use the tsNet external for this.
Find a lesson here:
https://lessons.livecode.com/m/4071/l/6 ... t-external
If you are using the community version, check this library ->
SMTP_library_demo.rev
Find it here:
https://github.com/trozware/rev_stacks
Best
Klaus
Re: How to send an email from the app?
Posted: Wed Feb 16, 2022 6:28 pm
by liveCode
I have a LIVECODE of the community
I tried the second option you brought but for some reason I did not succeed

Maybe there is another way?
Thanks
Attached is a photo of the error
Re: How to send an email from the app?
Posted: Wed Feb 16, 2022 6:36 pm
by Klaus
Hm, sorry, never worked with that library.
And currently no idea hwo to do this in another way...
Re: How to send an email from the app?
Posted: Wed Feb 16, 2022 6:45 pm
by liveCode
Thanks anyway...
I'll wait for others who may know how to help me

Re: How to send an email from the app?
Posted: Wed Feb 16, 2022 7:17 pm
by Emily-Elizabeth
gmail requires a secure connection.
Re: How to send an email from the app?
Posted: Wed Feb 16, 2022 7:42 pm
by liveCode
So how do I solve this problem?
Re: How to send an email from the app?
Posted: Wed Feb 16, 2022 7:55 pm
by Emily-Elizabeth
You can enable less secure apps in gmail. I don't use anything from Google, so I don't know where or how, but I'm sure you can google it

Re: How to send an email from the app?
Posted: Wed Feb 16, 2022 9:09 pm
by Emily-Elizabeth
Answer from stackoverflow[DOT]com/questions/11737728/smtp-library-demo-on-livecode
I believe that smtp[DOT]gmail[DOT]com uses SSL. Sarah's library doesn't do this. You need to authenticate with your correct Gmail user name and password and you might want to try executing the LiveCode syntax
libUrlSetSSLVerification false
You need to do this before you start using Sarah's lib. I wonder if you also need to fiddle with the default headers. For this, you need to edit the script of the lib.
Re: How to send an email from the app?
Posted: Wed Feb 16, 2022 9:29 pm
by dunbarx
Just who is this fabulous Emily???
Craig
Re: How to send an email from the app?
Posted: Thu Feb 17, 2022 1:17 pm
by liveCode
I still did not quite understand what I need to do for it to work
Re: How to send an email from the app?
Posted: Thu Feb 17, 2022 8:57 pm
by jacque
I have a shell script that sends email but I can't recall if Community supports shell. If so I'll find the handler and post it. Also, if the stack is for mobile it won't work; desktop apps only.
Re: How to send an email from the app?
Posted: Sat Feb 19, 2022 5:42 pm
by liveCode
The community version supports the SHELL command
But she can not work on a cell phone