smtp

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Klaus
Posts: 13820
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: smtp

Post by Klaus » Fri Sep 18, 2020 7:27 pm

Zazi wrote:
Fri Sep 18, 2020 7:16 pm
So I can't make smtp with community at all?
I don't know!
Zazi wrote:
Fri Sep 18, 2020 7:16 pm
And if I can I didn't get the live code server u can teach me master?
Whatever you mean with that, the answer is probably no.

Zazi
Posts: 15
Joined: Wed Sep 16, 2020 6:31 pm

Re: smtp

Post by Zazi » Fri Sep 18, 2020 7:33 pm

I meant that if I can make smtp with community u can tell me how to do with live code server u meant

Klaus
Posts: 13820
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: smtp

Post by Klaus » Fri Sep 18, 2020 7:41 pm

if I can make smtp with community
how to do with livecode server
These are two different things!
And if you can do it with the community version there is no need to do this also with the LC server.
Do you have access to a server that has the "LC server" software installed?

Zazi
Posts: 15
Joined: Wed Sep 16, 2020 6:31 pm

Re: smtp

Post by Zazi » Fri Sep 18, 2020 7:50 pm

I dont know what is it!
I use Gmail server for the smtp server

Klaus
Posts: 13820
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: smtp

Post by Klaus » Fri Sep 18, 2020 7:56 pm


Zazi
Posts: 15
Joined: Wed Sep 16, 2020 6:31 pm

Re: smtp

Post by Zazi » Fri Sep 18, 2020 8:02 pm

Probably that i will not get it but I will check it tomorrow thank u

Zazi
Posts: 15
Joined: Wed Sep 16, 2020 6:31 pm

Re: smtp

Post by Zazi » Sat Sep 19, 2020 10:49 am

What i need for the lc server just pc or like pc with some programs.
And I didn't really understand the guide what language is the script and where in need to write it in the cmd?
Thank u for helping me

Klaus
Posts: 13820
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: smtp

Post by Klaus » Sat Sep 19, 2020 11:25 am

You need a (internet) SERVER to install the LC server software as mentioned in the first couple of lines in the link I posted above:
...
The guide explains how to install LiveCode Server on Mac, Windows and Linux servers,
...
And the LC server script to send emails also relies on other server specific software like "sendmail".

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: smtp

Post by mwieder » Sat Sep 19, 2020 4:31 pm

why not just use revmail to send the email text to gmail?

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7228
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: smtp

Post by jacque » Sat Sep 19, 2020 6:10 pm

Zazi wrote:
Sat Sep 19, 2020 10:49 am
What i need for the lc server just pc or like pc with some programs.
And I didn't really understand the guide what language is the script and where in need to write it in the cmd?
Thank u for helping me
Do you have a website and your own domain name? The hardware that runs the website is the server. You need access to that so you can install your own server software. Some hosting companies do not allow you to do that, but if yours does then you can install LC server software there. That is not always easy to do.

I agree with Mark, it is much easier to use LC's revMail command.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Zazi
Posts: 15
Joined: Wed Sep 16, 2020 6:31 pm

Re: smtp

Post by Zazi » Sun Sep 20, 2020 6:47 am

I dont have access to my own website. My whole point is that people use my apps and want to send me email inside the app revmail copy what u wrote and open up mail app but then u left the app its not what I want

saw
Posts: 6
Joined: Fri Jul 31, 2020 10:30 am

Re: smtp

Post by saw » Sun Sep 20, 2020 9:04 am

If you are developing a desktop app how about using shell to call the curl command?
Curl is already installed on MacOS and Linux(?), should be easy to install it on Windows.
The following code worked for me on MacOS.

For this to work with GMail you have to allow 'Less secure app access' in your GMail account security settings.
Bear in mind that you will be storing your GMail account username and password in your app so best not use your main account if you use it for lots of services and password resets. You can use OAuth2 but its more complicated.

Code: Select all

put "Me" into tFromName
put "myaccount@gmail.com" into tFromEmail
put "Another Account" into tToName
put "someone@example.com" into tToEmail
put "gmailUserName" into tUserName
put "gmailPassword" into tPassword
put the internet date into tDateSent

put the tempname into tFile

put "From: " & tFromName & " <" & tFromEmail & ">" & cr &\
     "To: " & tToName & " <" & tToEmail & ">" & cr &\
     "Subject: Test" & cr &\
     "Date: " & tDateSent & cr &\
     cr &\
     "Testing, testing, 123" into tMessage

put tMessage into URL ("file:" & tFile)

put "curl smtps://smtp.gmail.com " &\
     " --silent --show-error" &\
     " --mail-from " & tFromEmail  &\
     " --mail-rcpt " & tToEmail &\
     " --user " & tUserName & ":" & tPassword &\
     " --upload-file " & tFile \
     into tCurlCommand

put shell( tCurlCommand ) into tResponse
if tResponse is empty then
  put "Email sent ok" into tResponse
end if
answer tResponse
Hope that helps

Zazi
Posts: 15
Joined: Wed Sep 16, 2020 6:31 pm

Re: smtp

Post by Zazi » Sun Sep 20, 2020 9:06 am

Its work to android app too?

saw
Posts: 6
Joined: Fri Jul 31, 2020 10:30 am

Re: smtp

Post by saw » Sun Sep 20, 2020 9:15 am

Probably not, according to the Dictionary the Livecode shell command is not available on Android.

Zazi
Posts: 15
Joined: Wed Sep 16, 2020 6:31 pm

Re: smtp

Post by Zazi » Sun Sep 20, 2020 9:26 am

So want u purpose to do sockets can work?

Post Reply

Return to “Internet”