[REBOL] Re: Cannot Connect
From: tim:johnsons-web at: 31-Aug-2001 13:46
On Fri, Aug 31, 2001 at 02:22:33PM -0700, Ammon Cooke wrote:
> I changed the smtp server & it works now. I think View is having trouble
> because scripts that access the web don't have a problem doing so.
It is highly likely that you will need to use different smtp
servers, depending on what machine you are sending email from.
In most cases, ISP's don't allow rerouting. For instance,
if I am testing from my own machine, I have to use smtp.gci.net.
If the finished product is running on my domain, then my cgi
program must use postoffice.cniweb.net.
I automate this by testing the first octet in system/options/cgi/remote-addr
I can be fairly certain that if I am testing on my machine, I will
find one of the following as the first octet:
private-octets: [192 10 172 127]
if find private-octets pick to-tuple system/options/cgi/remote-addr 1
I believe that the elements in 'private-octets are inclusive of
any reserved for private networks and loop-backs. If I'm
wrong - please somebody tell me! :>)
And of course, all assumptions above are based on sending
email from a CGI program.
> ----- Original Message -----
> From: "Tim Johnson" <[tim--johnsons-web--com]>
> To: <[rebol-list--rebol--com]>
> Sent: Friday, August 31, 2001 1:06 PM
> Subject: [REBOL] Re: Cannot Connect
> > Ammon, I got ahead of myself here, here's a couple more tips.
> > If you run into problems with the script below, and choose to
> > use 'trace AND if you are set up for CGI from your desktop,
> > put in a mime-text header and preformat tag, that way you you
> > might get a better look at the very verbose trace output,
> > see changes below
> > On Fri, Aug 31, 2001 at 12:28:43PM -0700, Ammon Cooke wrote:
> > > Hi,
> > >
> > > It logs in as the proper user, the odd part is the little progress
> > > down in the left hand window pops up then disappears while REBOL
> attempts to
> > > continue connecting. After I have used set-net at the command prompt
> what do
> > > I do?
> > Hmmm! Why don't you try this script below. Edit the strings following
> > my-email/from, my-email/server, my-email/to
> > try trace if you like. I find that starting with something very basic
> > at first helps......
> > REBOL
> > my-email: [from "[sender--domain--com]" server "smtp.somewhere.net"
> > to "[recipeint--domain--com]" subject "testing simple SMTP"]
> ;;> > > ;;sendmail: arg1 is block with 'sender 'server 'to 'subject
> > ;; arg2 is message body
> ;;> > > sendmail: func[setup[block!] message[string!]][
> > ; set mime-type for CGI
> > print "Content-Type: text/html^/"
> > ; set preformat for easier reading
> > print "<pre>"
> > ; try using trace : just uncomment
> > ;trace on
> > set-net[setup/from setup/server none none none none]
> > ;trace off
> > ;trace one
> > send/header to-email setup/to message make system/standard/email[
> > from: setup/from
> > subject: setup/subject
> > ]
> > ;trace off
> > ];end func
> > sendmail my-email "Hi, we're just testing here"
> > --
> > To unsubscribe from this list, please send an email to
> > [rebol-request--rebol--com] with "unsubscribe" in the
> > subject, without the quotes.
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> To unsubscribe from this list, please send an email to
> [rebol-request--rebol--com] with "unsubscribe" in the
> subject, without the quotes.
Tim Johnson <[tim--johnsons-web--com]>