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: 119
Joined: Sun Oct 17, 2021 5:53 pm

How to send an email from the app?

Post by liveCode » Wed Feb 16, 2022 5:00 pm

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: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: How to send an email from the app?

Post by Klaus » Wed Feb 16, 2022 5:17 pm

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: 119
Joined: Sun Oct 17, 2021 5:53 pm

Re: How to send an email from the app?

Post by liveCode » Wed Feb 16, 2022 6:28 pm

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: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: How to send an email from the app?

Post by Klaus » Wed Feb 16, 2022 6:36 pm

Hm, sorry, never worked with that library.
And currently no idea hwo to do this in another way...

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

Re: How to send an email from the app?

Post by liveCode » Wed Feb 16, 2022 6:45 pm

Thanks anyway...
I'll wait for others who may know how to help me👍

Emily-Elizabeth
Posts: 101
Joined: Mon Jan 03, 2022 7:10 pm

Re: How to send an email from the app?

Post by Emily-Elizabeth » Wed Feb 16, 2022 7:17 pm

gmail requires a secure connection.

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

Re: How to send an email from the app?

Post by liveCode » Wed Feb 16, 2022 7:42 pm

So how do I solve this problem?

Emily-Elizabeth
Posts: 101
Joined: Mon Jan 03, 2022 7:10 pm

Re: How to send an email from the app?

Post by Emily-Elizabeth » Wed Feb 16, 2022 7:55 pm

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: 101
Joined: Mon Jan 03, 2022 7:10 pm

Re: How to send an email from the app?

Post by Emily-Elizabeth » Wed Feb 16, 2022 9:09 pm

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: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: How to send an email from the app?

Post by dunbarx » Wed Feb 16, 2022 9:29 pm

Just who is this fabulous Emily??? :D

Craig

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

Re: How to send an email from the app?

Post by liveCode » Thu Feb 17, 2022 1:17 pm

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: 7229
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: How to send an email from the app?

Post by jacque » Thu Feb 17, 2022 8:57 pm

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: 119
Joined: Sun Oct 17, 2021 5:53 pm

Re: How to send an email from the app?

Post by liveCode » Sat Feb 19, 2022 5:42 pm

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

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”