ProHosting is... WORKING! cgiemail.r needs to specify server?
[1/7] from: giovanni:cardona at: 16-Dec-2000 16:15
Wow Michal... IT WORKED!!!! :)
I configured the html to work with the script, but
seems that the script cgiemailer.r itself requires a little work.
Any ideas?
This is the error it reports
** User Error: No network server for smtp is specified. ** Where: smtp-port:
open
[scheme: 'smtp] if email?
(yes I renamed cgiemailer.r to cgiemailer.cgi, converted the text
file to Unix format and chmod to 711)
[2/7] from: kracik:mbox:dkm:cz at: 16-Dec-2000 22:06
Hi,
you should use set-net REBOL function at the beginning of your script
and set some SMTP server to send email. Prohosting's free server does
not work as SMTP server, so you cannot use it. But even if you found
some other server that accepts incoming email from any domain (open
SMTP relay), it would not work from prohosting - it somehow blocks all
outgoing email. This (and introduction of banners) was the reason I
stopped using prohosting, and never completed the "how-to".
Anyway, this was the situation some time ago, maybe it has changed.
I asked the administrator and he did not explain why or how they block
outgoing email, he only wrote that paid prohosting service supports
sending email.
--
Michal Kracik
Giovanni Cardona wrote:
[3/7] from: giovanni::cardona::com at: 16-Dec-2000 18:34
Well, at least we can REBOL for free on this site ;)
I started learning REBOL last saturday and I just
finished my first CGI Rebol script to use it in my pet site:
http://balder.prohosting.com/~mambo966/cgi-bin/cgismpro.cgi
I think the code looks better than doing it with Perl anyways ;)
Your comments are very welcome!
#!rebol -cs
REBOL [
Title: "The Sea-Monkey Project"
Author: "[Giovanni--Cardona--com]"
Date: 16-12-2000
Version 0.1.2
File: %cgismpro.cgi
Email: "[seamonkeyuncle--netclubmedia--com]"
Rights: "Copyright Giovanni Cardona 2001"
Comment:
{ This program may help new
breeders to start a Sea-Monkey
family succesfully.
It will show a table of procedures
during the first month.
The user will then have an idea
of the decisions to take during
the rest of their pet life.
Visit the web site for more tips at:
http://roads.to/seamonkey
}
]
print "Content-Type: text/html^/" ;-- Required Page Header
;
;initialize values
set 'wait_eggs 24:00:00
set 'wait_first_food_dosis 5
set 'wait_first_plasma_dosis 10
set 'wait_food 4
set 'wait_plasma 14
;
set 'water-purifier now
set 'instant-life :water-purifier + :wait_eggs
set 'growth-food :instant-life + :wait_first_food_dosis
set 'plasma :instant-life + :wait_first_plasma_dosis
set 'first-month 31
;
;Block of messages, maybe be used as an
;external file for multi-language purpose
;Messages
set 'msg [
<b><i>Water Purifier</i></b>
<b><i>Instant Life</i></b>
<b><i>Growth Food</i></b>
<b><i>Plasma</i></b>
<u>First Dosis</u>
Next Dosis
<u>three</u> big scoops
one big scoop
one small scoop
<p><font size='+1' face='verdana, arial'>Follow this exact procedure for
the first two packets</font></p>
<p><font size='+1' face='verdana, arial'>Suggested <i>Growth-Food</i> dosis
during the first month</font></p>
<p><font size='+1' face='verdana, arial'>Suggested <i>Plasma</i> dosis
during the first month</font></p>
<br>
<b>entire packet</b>
{<center><h1><font color='#AA0000'>THE SEA-MONKEY
PROJECT:</font></h1><br><h2><font color='#0000AA'>TIME TABLE FOR THE FIRST
MONTH</font></h2><br><h3>Print this document</h3></center>}
{<p><font size='1' face='verdana, arial'>Please notice that I offer this
table as a reference only. That means that only you decide the exact
procedures to follow depending on your own experiences, regional
particularities like temperatures, water and air quality and the freshness
of your formulas, including storage temperatures, etc. By no means does <a
href='mailto:[seamonkeyuncle--netclubmedia--com']>The Sea-Monkey Uncle</a>
assume any responsability for any mishap that may occur when following the
procedures dictated in this table.</font></p>}
{<br><center><font size='1' face='verdana, arial'>You have to wait 24 hours
after Water Purifier to add Instant Life (next day/same
hour)</font></center>}
{<p><font size='1' face='verdana, arial'>Please visit us at <a
href='http://roads.to/seamonkey'>http://roads.to/seamonkey</a> for more
info, tricks & tips, real life video footage, virtual cards, historic view
or just participate in our monthly give-a-way!</font></p>}
{<p align='center'><font size='2' face='verdana, arial'>For a list of kits
on the internet click <b><a
href='http://w
ww.amazon.com/
exec/obidos/ex
ternal-search?
tag=theseamonk
eypage&keyword=sea+monkeys&mode=toys'>HERE</a></b>.</font></p>}
]
;list of repetitive tags series
set 'tgs [
<div align='center'><center><table width='80%'>
</table></center></div>
<tr><td>
</td></tr>
</td><td>
]
;Print Block
print "<html><head><title>SEA-MONKEY PLANNER</title></head>"
print "<body bgcolor='#FFFFFF'>"
print "<div align='center'><center><table width='90%' bgcolor='#FFFFAA'>"
print tgs/3
print msg/15
print msg/10
;
;Water Purifier & Instant Life dates
print tgs/1
print [tgs/3 msg/1 tgs/5 water-purifier/date water-purifier/time tgs/5
msg/14 tgs/4]
print [tgs/3 msg/2 tgs/5 instant-life/date instant-life/time tgs/5 msg/14
tgs/4]
print tgs/2
print msg/17
print msg/13
;
;
;display food dosis during the first month
;count an entire month after the water purifier
;
print msg/11
;
print tgs/1
for d growth-food (water-purifier + first-month) wait_food [
prin [tgs/3 d/date]
either (d = growth-food) [print [tgs/5 msg/5 msg/9 tgs/4]][print [tgs/5
msg/9 tgs/4]]
]
print tgs/2
;
;
;display plasma dosis during the first month
;count an entire month after the water purifier
;
print [msg/12]
;
print tgs/1
for p plasma (water-purifier + first-month) wait_plasma [
prin [tgs/3 p/date]
either (p = plasma) [print [tgs/5 msg/5 msg/7 tgs/4]][print [tgs/5 msg/8
tgs/4]]
]
print tgs/2
;
;final statements
;disclaimer, etc
print msg/13
print "<hr width='90%'>"
print msg/13
print msg/16
print msg/18
print msg/19
print msg/13
print [tgs/4 tgs/2 msg/13]
print "</body></html>"
;
----- Original Message -----
From: Michal Kracik <[kracik--mbox--dkm--cz]>
To: <[rebol-list--rebol--com]>
Sent: Saturday, December 16, 2000 2:06 PM
Subject: [REBOL] Re: ProHosting is... WORKING! cgiemail.r needs to specify
server?
[4/7] from: carlos:lorenz at: 16-Dec-2000 22:12
would you mind giving me a step by step instructions on how to make it
works?
--Carlos Lorenz
----- Original Message -----
From: "Giovanni Cardona" <[giovanni--cardona--com]>
To: <[rebol-list--rebol--com]>
Sent: Sunday, December 17, 2000 12:34 AM
Subject: [REBOL] Re: ProHosting is... WORKING! cgiemail.r needs to specify
server?
[5/7] from: giovanni:cardona at: 16-Dec-2000 22:45
Hi!
I followed Mr.Kracik instructions on his web page
http://hammer.prohosting.com/~rebol/rebol-cgi-prohosting.html
download the BSDI version of REBOL and save it
on cgi-bin, rename your script as .cgi and chmod them
at 711.
Remember that the CR/LF of your script needs to be
UNIX format.
----- Original Message -----
From: Lorenz <[carlos--lorenz--net]>
To: <[rebol-list--rebol--com]>
Sent: Saturday, December 16, 2000 4:12 PM
Subject: [REBOL] Re: ProHosting is... WORKING! cgiemail.r needs to specify
server?
[6/7] from: arolls:bigpond:au at: 17-Dec-2000 14:15
> I followed Mr.Kracik instructions on his web page
> http://hammer.prohosting.com/~rebol/rebol-cgi-prohosting.html
> download the BSDI version of REBOL and save it
> on cgi-bin, rename your script as .cgi and chmod them
> at 711.
Can we specify permissions when uploading files *in rebol* ,
so we don't have to use chmod in another ftp client ?
It's sub-optimal to have to open another ftp client.
> Remember that the CR/LF of your script needs to be
> UNIX format.
For anyone who doesn't know how to do this,
I did it this way:
write/string server-file read/string local-file
from write help:
/string -- Translates all line terminators.
Note, like /binary, you need to specify /string when
reading *and* writing, otherwise it won't work.
Anton.
[7/7] from: rebol:techscribe at: 15-Jan-2001 11:21
You do need to tell REBOL which smtp acccount it should use to send out
the mail (set-net, the same thing you do when you install REBOL on your
machien. Look in your local user.r file.)
I don't think that prohosting gives you an email account, so you
probably cannot use something like smtp.prohosting.com, or
mail.prohosting.com. The question is if your regular email account (the
one you use to send out email), will forward the email for you. I've had
problems doing that with my ISP. I've gotten it to work with other ISP's
though.
Elan
Giovanni Cardona wrote: