eMail from cgi

Are you using LiveCode to create server scripts or CGIs?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dbrooksne
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4
Joined: Thu May 04, 2006 7:55 pm
Location: University of Nebraska
Contact:

eMail from cgi

Post by dbrooksne » Thu Jun 29, 2006 3:17 pm

I've been sending eMail from a Web-based HyperCard system successfully.

After last year's RevCon West I started making a SECOND conversion of my HC materials. The first was a simple port to RunRev; the current uses Revolution cgi scripts and xml files.

I've used the libSmtp253.rev stack as a Library and written a test stack that readily sends e-mail. When I try to use the same scripting and the same library from a cgi, it fails. I'm a journeyman scripter. As I review the script of the libSmtp253.rev, it does not strike me as doing any of those things that shut down cgi scripts (write to a fiedd, put, go to a cd, etc.)

Any suggestions will be helpful. This is NOT an all purpose tool, by the way. I always send the same message to a student's mentor indicating that student essays need an evaluation. Right now, the number of mentors is just three.
David W. Brooks

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9837
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: eMail from cgi

Post by FourthWorld » Thu Jun 29, 2006 3:56 pm

dbrooksne wrote: I've used the libSmtp253.rev stack as a Library and written a test stack that readily sends e-mail. When I try to use the same scripting and the same library from a cgi, it fails.
When it fails, does it give an error message? Is "the result" empty?

dbrooksne
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4
Joined: Thu May 04, 2006 7:55 pm
Location: University of Nebraska
Contact:

the Result

Post by dbrooksne » Thu Jun 29, 2006 5:16 pm

I'm not sure one can look at 'the result' in a cgi operation. I guess I could try to write that to a file, but I'm guessing it won't work.
David W. Brooks

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9837
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: the Result

Post by FourthWorld » Thu Jun 29, 2006 6:57 pm

dbrooksne wrote:I'm not sure one can look at 'the result' in a cgi operation. I guess I could try to write that to a file, but I'm guessing it won't work.
You could have it return the result so the client calling it can display it. You can also write it to a file into any directory where the CGI has write permissions. I've found some servers won't let me write to the same directory as the CGI itself, but I can to a sub-folder within it or to one a level up.

Post Reply

Return to “CGIs and the Server”