Page 2 of 3
Re: smtp
Posted: Fri Sep 18, 2020 7:27 pm
by Klaus
Zazi wrote: Fri Sep 18, 2020 7:16 pmSo I can't make smtp with community at all?
I don't know!
Zazi wrote: Fri Sep 18, 2020 7:16 pmAnd 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.
Re: smtp
Posted: Fri Sep 18, 2020 7:33 pm
by Zazi
I meant that if I can make smtp with community u can tell me how to do with live code server u meant
Re: smtp
Posted: Fri Sep 18, 2020 7:41 pm
by Klaus
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?
Re: smtp
Posted: Fri Sep 18, 2020 7:50 pm
by Zazi
I dont know what is it!
I use Gmail server for the smtp server
Re: smtp
Posted: Fri Sep 18, 2020 7:56 pm
by Klaus
Re: smtp
Posted: Fri Sep 18, 2020 8:02 pm
by Zazi
Probably that i will not get it but I will check it tomorrow thank u
Re: smtp
Posted: Sat Sep 19, 2020 10:49 am
by Zazi
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
Re: smtp
Posted: Sat Sep 19, 2020 11:25 am
by Klaus
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".
Re: smtp
Posted: Sat Sep 19, 2020 4:31 pm
by mwieder
why not just use revmail to send the email text to gmail?
Re: smtp
Posted: Sat Sep 19, 2020 6:10 pm
by jacque
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.
Re: smtp
Posted: Sun Sep 20, 2020 6:47 am
by Zazi
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
Re: smtp
Posted: Sun Sep 20, 2020 9:04 am
by saw
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
Re: smtp
Posted: Sun Sep 20, 2020 9:06 am
by Zazi
Its work to android app too?
Re: smtp
Posted: Sun Sep 20, 2020 9:15 am
by saw
Probably not, according to the Dictionary the Livecode shell command is not available on Android.
Re: smtp
Posted: Sun Sep 20, 2020 9:26 am
by Zazi
So want u purpose to do sockets can work?