r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Core] Discuss core issues

Robert
9-Oct-2010
[18697]
So, I need to send seme emails and need to login into my SMTP server. 
And this mostly fails out-of-the box in Rebol 2 and I can't remember 
what to do to make it work:

>> send [robert-:-muench-:-googlemail-:-com] "Test"
Net-log: ["Opening" "tcp" "for" "esmtp"]
connecting to: mail.saphirion.com
Net-log: [none "220"]

Net-log: {220 mail.saphirion.com ESMTP Exim 4.63 Sat, 09 Oct 2010 
12:12:46 +0200}
Net-log: [["EHLO" system/network/host] "250"]

Net-log: {250-mail.saphirion.com Hello mail.saphirion.com [10.0.0.3]}
Net-log: "250-SIZE 52428800"
Net-log: "250-AUTH LOGIN CRAM-MD5 DIGEST-MD5"
Net-log: "250 HELP"
Net-log: ["Supported auth methods:" [login cram]]
Net-log: ["MAIL FROM: <[robert-:-muench-:-saphirion-:-com]>" "250"]
Net-log: "250 OK"
Net-log: ["RCPT TO: <[robert-:-muench-:-googlemail-:-com]>" "250"]
** User Error: Server error: tcp 530 Relaying not allowed
** Near: insert smtp-port reduce [from reduce [addr] tmp]


I think the probem is that Rebol isn't logging in correctly. Either 
it doesn't understand the supported methods or something else is 
different. Any ideas how I can fix it or track it down?
PeterWood
9-Oct-2010
[18698]
0.k='45
Robert
9-Oct-2010
[18699]
?
PeterWood
9-Oct-2010
[18700x4]
Sorry I forgot to decompress the message:


I have no problem sending from an ESMTP account from Rebol after 
setting the account name and password with set-net:
? set-net is pretty self-explanatory.
You could possibly get this message if you are not directly connected 
to the ISP hosting saphirion.com.

I found this explanation helpful :

http://www.answersthatwork.com/Download_Area/ATW_Library/Networking/Network__3-SMTP_Server_Status_Codes_and_SMTP_Error_Codes.pdf
If it's neither of those this script at REBOL.org may be of help 
:

http://www.rebol.org/view-script.r?script=patch-esmtp-net.r
amacleod
9-Oct-2010
[18704]
whats the easiest way to assign a block of values to a block of words? 

fields: [ref lname fname]
data: [1 "Smith" "Bob"]
ChristianE
9-Oct-2010
[18705]
set fields data
amacleod
9-Oct-2010
[18706]
thanks
Steeve
9-Oct-2010
[18707]
lol
Henrik
9-Oct-2010
[18708]
:-) had amacleod not been a REBOLer, he might have said "stop making 
jokes".
Pekr
9-Oct-2010
[18709]
awesome :-)
amacleod
9-Oct-2010
[18710]
I've been assigning them one at a time this whole time...feel like 
a dope
Steeve
9-Oct-2010
[18711]
Hard time to pass by, don't worry, we sympatize :-)
GrahamC
9-Oct-2010
[18712x3]
this creates globals though
And in R3, it will bypass the setting of locals with funct
and in R2 using the r2/forwards
Steeve
9-Oct-2010
[18715]
he ? SET doesn't modify the bouding context of the words
GrahamC
9-Oct-2010
[18716]
>> unset 'crap
>> context [ set [ crap ] [ 1 ]]
>> crap
== 1
Steeve
9-Oct-2010
[18717]
so what ? you didn't declare 'crap in the context.
SET doesn't modify the context.
GrahamC
9-Oct-2010
[18718]
>> global: 1
== 1
>> do test: funct [ ][ set 'global 2 ]
== 2
>> global
== 2
Steeve
9-Oct-2010
[18719]
so what ? you didn't declare 'crap in the context.
SET doesn't modify the context the words.
GrahamC
9-Oct-2010
[18720]
I'm saying that if you use the set method, then your words appear 
in the global context which you may not want
Steeve
9-Oct-2010
[18721x2]
So what ? you don't declare 'crap in the context.
I repeat: SET doesn't modify the context of the words.

Here  it's local.
>> c: context [crap: 0 set [crap] [1]] c/crape
== 1
Sorry for the echo, my connection is bad currenlty
GrahamC
9-Oct-2010
[18723]
It's Altme ....
Henrik
9-Oct-2010
[18724]
I think Graham simply wants the block to be set within the context 
with as little additional code as possible.
GrahamC
9-Oct-2010
[18725x2]
If you want to use the set method of whole sale settting variables 
you have to declare them first in the context to prevent them from 
becoming global.  So what gain is there?
unless you do something like this

use fields [
	set fields data
]
Ladislav
9-Oct-2010
[18727x2]
this creates globals though

 - this is actually wrong, SET does neither "create", nor "globals"
And in R3, it will bypass the setting of locals with funct

 - in R2, as well as in R3, when using the SET function, you bypass 
 the collection of object locals. In R3, with FUNCT, you may not bypass 
 the collection as follows:

set [a: b:] [1 2]
GrahamC
9-Oct-2010
[18729x2]
neat trick
because 'funct scans the body of the function looking for set-words
Ladislav
9-Oct-2010
[18731]
Actually, I already used the trick in R3
Steeve
9-Oct-2010
[18732x2]
with collect-words, an handy function, not well known
native by the way
Ladislav
9-Oct-2010
[18734]
COLLECT-WORDS is a native, but it is quite easy to define it in R2 
as a mezzanine
Steeve
9-Oct-2010
[18735:last]
but not soo fast indeed :-)