How to send an email from the app?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
liveCode
Posts: 124
Joined: Sun Oct 17, 2021 5:53 pm

How to send an email from the app?

Post 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
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: How to send an email from the app?

Post 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
liveCode
Posts: 124
Joined: Sun Oct 17, 2021 5:53 pm

Re: How to send an email from the app?

Post 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
Attachments
ללא שם.png
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: How to send an email from the app?

Post by Klaus »

Hm, sorry, never worked with that library.
And currently no idea hwo to do this in another way...
liveCode
Posts: 124
Joined: Sun Oct 17, 2021 5:53 pm

Re: How to send an email from the app?

Post by liveCode »

Thanks anyway...
I'll wait for others who may know how to help me👍
Emily-Elizabeth
Posts: 205
Joined: Mon Jan 03, 2022 7:10 pm
Contact:

Re: How to send an email from the app?

Post by Emily-Elizabeth »

gmail requires a secure connection.
liveCode
Posts: 124
Joined: Sun Oct 17, 2021 5:53 pm

Re: How to send an email from the app?

Post by liveCode »

So how do I solve this problem?
Emily-Elizabeth
Posts: 205
Joined: Mon Jan 03, 2022 7:10 pm
Contact:

Re: How to send an email from the app?

Post 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 ;-)
Emily-Elizabeth
Posts: 205
Joined: Mon Jan 03, 2022 7:10 pm
Contact:

Re: How to send an email from the app?

Post 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.
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10501
Joined: Wed May 06, 2009 2:28 pm

Re: How to send an email from the app?

Post by dunbarx »

Just who is this fabulous Emily??? :D

Craig
liveCode
Posts: 124
Joined: Sun Oct 17, 2021 5:53 pm

Re: How to send an email from the app?

Post by liveCode »

I still did not quite understand what I need to do for it to work
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: How to send an email from the app?

Post 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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
liveCode
Posts: 124
Joined: Sun Oct 17, 2021 5:53 pm

Re: How to send an email from the app?

Post by liveCode »

The community version supports the SHELL command
But she can not work on a cell phone
Post Reply