revmail

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
Steve Denney
Posts: 101
Joined: Wed Dec 22, 2010 8:17 pm

revmail

Post by Steve Denney » Wed Dec 22, 2010 9:02 pm

Hi, I'm trying to put an email link in a revlet but it's not working. I'm using the the trial download on windows for the build.
I've tried revmail & revGoUrl (fld script), both of which work for desktop builds, without success.
In a previous post (Re: Using RevMail with Mac OS X) the solution was apparently to: in the 'Standalone Application Settings window, activate the Security Setting "Use the settings" and choose Process'.
Unfortunately, this doesn't work for me.
It also causes the "This revlet...requests access to your computer" message to be displayed. My client/most frequent employer saw this & reacted badly to say the least. Probably off topic but i really can't see the need for such an alarming message i.e. you don't don't get this with php, flash etc -- and it's only an email link!
Aside from this, livecode so far looks fantastic: just what i've always wanted.
Any solution would be greatly appreciated, thanks
Steve

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: revmail

Post by FourthWorld » Thu Dec 23, 2010 12:04 am

Steve Denney wrote:Hi, I'm trying to put an email link in a revlet but it's not working. I'm using the the trial download on windows for the build.
I've tried revmail & revGoUrl (fld script), both of which work for desktop builds, without success.
In a previous post (Re: Using RevMail with Mac OS X) the solution was apparently to: in the 'Standalone Application Settings window, activate the Security Setting "Use the settings" and choose Process'.
Unfortunately, this doesn't work for me.
I believe the issue may be a Windows "feature" in which URLs are limited in length. The exact length seems to vary among different versions of the OS, but IIRC 512 is the smallest limit I've encountered.

Because RevMail uses the mailto: protocol, the message subject line, address, and the body all count as part of the URL length.

But since you're already running in a browser with a revlet, perhaps you could have it send the message to a CGI on your server which then emails the message to you.

That would also take care of this issue:
It also causes the "This revlet...requests access to your computer" message to be displayed. My client/most frequent employer saw this & reacted badly to say the least. Probably off topic but i really can't see the need for such an alarming message i.e. you don't don't get this with php, flash etc -- and it's only an email link!
An email link is a protocol ("mailto:") that's handled by another application outside of the browser, the user's default email client. As such, it invokes inter-process communication within the OS.

In HTML, mailto is handled by the browser's Applications settings, so while it's still an IPC invokation it's considered pre-approved by the user's settings there.

But plugins operate as a separate process from the browser, and as such the RevWeb plugin makes its own calls to set up the mail client, requiring the warning.

It may be useful for the long term to consider submitting a bug report for this, so that RevMail could use a JavaScript callback to the brower to invoke the browser's own handling of mailto, obviating the need for Rev's special handling of that protocol.

But in the meantime, it uses custom handling so I believe your best bet will be a CGI, which will make for a simpler user interaction as well since it'll simply send the message without requiring the user to do anything more.

Aside from this, livecode so far looks fantastic: just what i've always wanted.
Welcome aboard. As you spend more time with it it gets even more fun, with the biggest risk being that it can become addictive. :)
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Steve Denney
Posts: 101
Joined: Wed Dec 22, 2010 8:17 pm

Re: revmail

Post by Steve Denney » Thu Dec 23, 2010 2:40 am

Hi Richard,

I did read earlier posts describing difficulties using rev to email with windows, but thought they didn't apply since there wasn't mention of revlets (and my desktop builds have always worked).
Perhaps that is the issue though, although the domain name itself is only 14 chars and there's no message. I've just tried to find out how many chars IIRC 512 might refer to and have come across 64-68 which would be longer than the full url + protocol, but no matter.

I won't submit a bug report as it's early days for me and others will no doubt experience the same issue if it's a real problem.

Your suggestion to use a CGI script is what I'll do: the powers-that-be have just told me they want an email confirmation sent to customers and a notification back to base for every order that appears on their server. I'll have to learn how to prepare such a script, but I'm sure it'll be a useful thing to know. Originally I intended only a manual email button for visitors to use if they wished and an answer info msg informing actual customers their order had been successfull received; post to php works just fine.

I can't understand why people aren't up in arms over the wording/placement of the "This revlet...requests access to your computer" message. I thought it would be an issue the moment I saw it, and guess what? --it was. I won't be able to use any revlet features that cause it to appear, aside from with small circles of captive users (like students, where the lecturer/introductory web page will assure them it means nothing sinister) at least that's my thinking.
Many thanks
Steve

Steve Denney
Posts: 101
Joined: Wed Dec 22, 2010 8:17 pm

Re: revmail

Post by Steve Denney » Thu Dec 23, 2010 4:15 am

Hi, all (and especially Richard, for your prompt reply).
I'm posting this in case anyone invests time trying to help me prepare a CGI script. I've discovered (& already got working) some simple php code that'll send the 2 required emails mentioned above. When the customer clicks the order submit btn within the revlet, post it to URL sends the data to the php page which then writes the order to the server & sends the emails. There may yet be some pitfall here that i'm not aware of, but at the moment this seems to be all I need.
Thanks again
Steve

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: revmail

Post by FourthWorld » Thu Dec 23, 2010 11:25 pm

Steve Denney wrote:I can't understand why people aren't up in arms over the wording/placement of the "This revlet...requests access to your computer" message. I thought it would be an issue the moment I saw it, and guess what? --it was. I won't be able to use any revlet features that cause it to appear, aside from with small circles of captive users (like students, where the lecturer/introductory web page will assure them it means nothing sinister) at least that's my thinking.
That's probably the best approach. For public use such features are frightening, and IMO should be used very sparingly to reflect better not only on our sites but on RunRev as well:

http://livecodejournal.com/blog.irv?pid ... 837.378884

Glad you got the email thing worked out. It's a handy script to have in your toolbelt, useful for all kinds of web apps.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply