Home   Archive   Permalink


Trouble in paradise ... I got a form working to save to a file, but when I try to use the mail protocol, it fails.
** Access Error: Network timeout
** Where: confirm
** Near: smtp-port: open [scheme: 'esmtp]
either only
I am sure all the settings are right. I have used several smtp servers all fail. Even my provider smtp fails so it is not that.
R E B O L [title: "Send Email"]
system/schemes/pop/host: "pop.server1"
system/schemes/default/host: "smtp.server1"
system/schemes/default/user: "username"
system/schemes/default/pass: "password1"
system/user/email: you@site.com
view layout [
     text "Email:"
     f: field "joe@site.com"
     text "Message:"
     a: area
     btn "Send" [
         send to-email f/text a/text
         alert "Sent"
This is the code I am using, with no success, any advice out there?

posted by:   ron     26-Jan-2014/13:56:35-8:00

Who is your smtp provider?

posted by:   Nick     26-Jan-2014/21:23:42-8:00

I've seen a number of changes by Lunarpages hosting over the years. Currently, port 25 is blocked by my ISP, to lunarpages. I get around all the mail security issues by running a CGI script on my server - I've never had problems accessing email by a script running on the same domain.
Can you read your email with editor pop://user@site.com ?

posted by:   Nick     26-Jan-2014/21:40:11-8:00

If your account requires secure login, you can use Graham's protocols:
For example, this is required is you want to use a Google mail account:
R E B O L []
do %prot-ssmtp.r
do %prot-ssend.r
set-net [username@gmail.com smtp.gmail.com none none none none username@gmail.com "password" ]
ssend name@site.com "Hello ... test message"
print "Done"

posted by:   Nick     27-Jan-2014/7:51:07-8:00

And to read email with secure POP:
R E B O L []
do %prot-spop.r
editor spop://username:password@pop.gmail.com
; OR open a port and read individual messages:
mbox: open compose [
     scheme: 'spop
     host: "pop.gmail.com"
     user: username@gmail.com
     pass: "password"
print pick mbox 1 ; pick head mbox 1
close mbox
print "Done"

posted by:   Nick     27-Jan-2014/8:10:37-8:00

got it working ... though my Gmail did not work...

posted by:   done     27-Jan-2014/14:55:30-8:00

next step... to get the cgi working.

posted by:   ron     27-Jan-2014/14:58:05-8:00

Good to hear you got it working. I haven't heard of anyone who hasn't gotten their Gmail account working using ssmtp.r, ssend.r, and spop.r. Curious what errors you received.

posted by:   Nick     27-Jan-2014/23:22:31-8:00

I will try it again today with Gmail...but it is working with inbox.com......
BTW Nick, I sent you a Skype friend request on your music site, did you get it?

posted by:   ron     28-Jan-2014/6:51:34-8:00

error from google attempt..
** Syntax Error: Script is missing a REBOL header
** Near: do/args script system/script/args

posted by:   ron     28-Jan-2014/7:00:50-8:00

Every Rebol script needs to start with at least a minimal R E B O L [] header. You'll see that most often if you're 'do'ing a script from a file, which doesn't contain a header. Be sure that if you're importing a file downloaded from the web, that you download the file, and not an HTMLized version from a browser window. I've seen that error when running library files which haven't been properly saved from a web page.

posted by:   Nick     28-Jan-2014/9:52:47-8:00

See my answer here: http://rebolforum.com/index.cgi?f=printtopic&permalink=Nick12-Jan-2014/23:03:33-8:00&archiveflag=new

posted by:   Nick     28-Jan-2014/12:55:45-8:00