Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

initializing system/standard/email

 [1/13] from: tim-johnsons::web::com at: 4-Aug-2006 15:35


Seeing some weird problems with 'send... Partial, but working code: to-addr: to-email email ;; cast 'email to email data type to-envelope: make system/standard/email[ To: to-addr from: info-alaska-internet-solutions.com subject: subj ] ;; OOPS! error is thrown Server error: tcp 553 5.0.0 <>... User address required a dump of probe to-envelope looks like this: make object! [ To: test-johnsons-web.com ;; looks like email! to me... CC: none BCC: none From: info-alaska-internet-solutions.com Reply-To: none Date: none Subject: "Boreal Imagery Receipt FOR TESTING PURPOSES ONLY." Return-Path: none Organization: none Message-Id: none Comment: none X-REBOL: "Core 2.6.2.4.2 http://WWW.REBOL.COM" MIME-Version: none Content-Type: none Content: none ] solution (in the block): To: to-email to-addr ;; to-email was already applied! I would welcome some observations or opinions about this. On a further note, I made a copy of 'send, used it in my source and put in debugging stubs. I could see that at the following line: if not show [insert clear header-obj/to addr] ;; 'addr is being 'clear'ed I really love rebol, but I use python also. I have *never* had legacy python code break with a new installation. (grumble, grumble) :-) Inquiring minds want to know. problem with the 'make action value? thanks tim -- Tim Johnson <tim-johnsons-web.com> http://www.alaska-internet-solutions.com

 [2/13] from: gabriele::colellachiara::com at: 5-Aug-2006 8:48


Hi Tim, On Saturday, August 5, 2006, 1:35:16 AM, you wrote: TJ> if not show [insert clear header-obj/to addr] TJ> ;; 'addr is being 'clear'ed Check if it's is RAMBO already, otherwise please add it. As a workaround, just COPY the email address you are passing as argument (so it's not the SAME? as header/to). Regards, Gabriele. -- Gabriele Santilli <gabriele-rebol.com> --- http://www.rebol.com/ Colella Chiara software division --- http://www.colellachiara.com/

 [3/13] from: tim-johnsons::web::com at: 5-Aug-2006 16:40


* Gabriele Santilli <gabriele-colellachiara.com> [060804 23:00]:
> Hi Tim,
Hi Gabriele:
> On Saturday, August 5, 2006, 1:35:16 AM, you wrote: > > TJ> if not show [insert clear header-obj/to addr] > TJ> ;; 'addr is being 'clear'ed > > Check if it's in RAMBO already, otherwise please add it.
Done.
> As a > workaround, just COPY the email address you are passing as > argument (so it's not the SAME? as header/to).
Understood... Thanks. Keep up the good work. Tim -- Tim Johnson <tim-johnsons-web.com> http://www.alaska-internet-solutions.com

 [4/13] from: jjmmes:yaho:o:es at: 1-Sep-2006 20:38


I don't think this is a bug. The show option is to show all recipients in to field, which is normally not good when you send email to multiple recipients. In the default case the recipient just sees his email in the To field but not the other emails the message has been sent to.
>> help send
USAGE: SEND address message /only /header header-obj /attach files /subject subj /show DESCRIPTION: Send a message to an address (or block of addresses) SEND is a function value. ARGUMENTS: address -- An address or block of addresses (Type: email block) message -- Text of message. First line is subject. (Type: any) REFINEMENTS: /only -- Send only one message to multiple addresses /header -- Supply your own custom header header-obj -- The header to use (Type: object) /attach -- Attach file, files, or [.. [filename data]] files -- The files to attach to the message (Type: file block) /subject -- Set the subject of the message subj -- The subject line (Type: any) /show -- Show all recipients in the TO field
>>
--- Tim Johnson <tim-johnsons-web.com> escribió:
> * Gabriele Santilli <gabriele-colellachiara.com> > [060804 23:00]:
<<quoted lines omitted: 24>>
> To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject.
______________________________________________ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com

 [5/13] from: gabriele:colellachiara at: 2-Sep-2006 13:38


Hi Jose, On Friday, September 1, 2006, 8:38:41 PM, you wrote: j> I don't think this is a bug. The problem is not /SHOW, the problem is that CLEAR is clearing the passed email address and this is a bug (due to my obsession for optimization ;). Regards, Gabriele. -- Gabriele Santilli <gabriele-rebol.com> --- http://www.rebol.com/ Colella Chiara software division --- http://www.colellachiara.com/

 [6/13] from: jjmmes::yahoo:es at: 3-Sep-2006 15:34


Hi Gabriele, I still don't see the bug and I've studied this code before.
> > TJ> if not show [insert clear header-obj/to addr] > > TJ> ;; 'addr is being 'clear'ed
What is cleared is header-obj/to BUT not addr I might be missing something ! thxs --- Gabriele Santilli <gabriele-colellachiara.com> escribió:
> Hi Jose, > On Friday, September 1, 2006, 8:38:41 PM, you wrote:
<<quoted lines omitted: 14>>
> To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject.
______________________________________________ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com

 [7/13] from: tim-johnsons:web at: 3-Sep-2006 8:07


* jose <jjmmes-yahoo.es> [060903 05:37]:
> Hi Gabriele, > > I still don't see the bug and I've studied this code > before. > > > > TJ> if not show [insert clear header-obj/to addr] > > > TJ> ;; 'addr is being 'clear'ed
Hello jose:
> What is cleared is header-obj/to BUT not addr
1)'send needs the 'address and 'message arguments 2)with the /header refinement, a header-obj of type object! is also required The problem occurs when the /header refinement is used and the 'to member of the header object is *also* used as the 'address argument, because the following block: [insert clear header-obj/to addr] "destroys" the address ^ ;; same reference as 'address Thus the fix is to create a new reference to the address by using 'copy. To better understand the issue here's a console session to illustrate:
>> t: "jose"
t: "jose" == "jose"
>> n: copy "jose"
n: copy "jose" == "jose"
>> n = t
n = t == true
>> same? n t
same? n t == false
>> o: context [t1: "jose"]
o: context [t1: "jose"]
>> t2: o/t1
t2: o/t1 == "jose"
>> same? t2 o/t1
same? t2 o/t1 == true
>> clear t2
clear t2 == ""
>> probe o
probe o make object! [ t1: "" ] ===================================================== I hope this helps and by now you can see the 'copy creates a new reference and when 'address and header-obj/to are the same reference, changing one, changes the other. tim ((whois an ol' "c-dog") think-pointers!) -- Tim Johnson <tim-johnsons-web.com> http://www.alaska-internet-solutions.com

 [8/13] from: gabriele:colellachiara at: 4-Sep-2006 10:46


Hi Tim, On Sunday, September 3, 2006, 6:07:04 PM, you wrote:
>> I still don't see the bug and I've studied this code >> before.
TJ> 1)'send needs the 'address and 'message arguments TJ> 2)with the /header refinement, a header-obj of type TJ> object! is also required TJ> The problem occurs when the /header refinement is used TJ> and the 'to member of the header object is *also* used TJ> as the 'address argument, Exactly, but not only that - you don't want what you gave as header/to cleared in any case. The fix is: either header-obj/to [ header-obj/to: copy header-obj/to ] [ header-obj/to: tmp: make string! 20 if show [ foreach email address [repend tmp [email ", "]] clear back back tail tmp ] ] or, to avoid copying when not necessary, the copy could be done in the "not only" case. Regards, Gabriele. -- Gabriele Santilli <gabriele-rebol.com> --- http://www.rebol.com/ Colella Chiara software division --- http://www.colellachiara.com/

 [9/13] from: jjmmes:y:ahoo:es at: 4-Sep-2006 23:08


> I hope this helps and by now you can see the 'copy > creates a new reference and when 'address and > header-obj/to > are the same reference, changing one, changes the > other. >
Did you post your fix to RAMBO ? I couldn't find it. The only case were header-obj/to and address are the same is when you want to show the recipient list to everybody. if not show [insert clear header-obj/to addr] so this doesn't seem a bug to me but I agree to disagree! One thing I dislike about rebol is how poorly coded are important protocols like SMTP, e.g. there have been a few RAMBO entries about proper STMP authentication handling but only the must basic bugs are fixed and the implementation remains widely incomplete. I find this doesn't happen in other languages, e.g. Ruby, b/c someone with real interest in the protocol owns the implementation and ensures it is widely useful beyond basic academic examples Maybe R3 will change this but I doubt it 99%. Today is my pessimistic day of the year !! ______________________________________________ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com

 [10/13] from: jjmmes:yaho:o:es at: 4-Sep-2006 23:14


--- Gabriele Santilli <gabriele-colellachiara.com> escribió:
> Exactly, but not only that - you don't want > what you gave as > header/to cleared in any case.
I missed your reply. Now I understand ! thanks The fix is:
> either header-obj/to [ > header-obj/to: copy header-obj/to
<<quoted lines omitted: 19>>
> To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject.
______________________________________________ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com

 [11/13] from: tim-johnsons:web at: 5-Sep-2006 9:16


* jose <jjmmes-yahoo.es> [060904 13:14]:
> > I hope this helps and by now you can see the 'copy > > creates a new reference and when 'address and
<<quoted lines omitted: 3>>
> > > Did you post your fix to RAMBO ? I couldn't find it.
No. I did post the behavior as bug. As per Gabriele's advice.
> so this doesn't seem a bug to me but I agree to > disagree! > One thing I dislike about rebol is how poorly coded > are important protocols like SMTP,
Perhaps we should call it "poor code" as opposed to "bug" <grin>...
> Maybe R3 will change this but I doubt it 99%. Today is > my pessimistic day of the year !!
rebol is a work in progress. I agree with you on some of your opinions but this is the way I think of it: I now code regularly in 3 other languages besides rebol: python javascript elisp If I've been working in any of those three for some time, and go back to rebol I feel like I've gone from a big truck to a sports car and the wind is in my face! In time of sheer productivity line-for-line, rebol beats all of those above. Two striking examples are the 'ml protocol which is *sooo* much nicer to use than the python HtmlGen module and pdf-maker is way more efficient that reportlab, in my experience. Stay tuned! tj -- Tim Johnson <tim-johnsons-web.com> http://www.alaska-internet-solutions.com

 [12/13] from: jjmmes:yah:oo:es at: 15-Sep-2006 0:39


--- Tim Johnson <tim-johnsons-web.com> escribió:
> rebol is a work in progress. I agree with you on > some of
<<quoted lines omitted: 17>>
> pdf-maker is way > more efficient that reportlab, in my experience.
I agree with you on using multiple languages. my prefs - c++: for serious development - rebol: nice for cgis and productivity but the lack of docs, external libraries, closed source make it much less appealing - javascript: a must for complex web development - ruby: the hot thing!. libraries, lots of developers . - scheme: for the academic point of view I agree pdf-maker is one of the greatest (or the greatest) real world Rebol apps (sad that there are so few!). Is ml protocol really so nice ? ______________________________________________ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com

 [13/13] from: tim-johnsons:web at: 14-Sep-2006 15:42


* jose <jjmmes-yahoo.es> [060914 14:44]:
> I agree pdf-maker is one of the greatest (or the > greatest) real world Rebol apps (sad that there are > so few!). Is ml protocol really so nice ? >
Yes. 'way more efficient than using python HtmlGen, although it doesn't do any checking for acceptable html keywords - not that it is all that necessary for me. tim -- Tim Johnson <tim-johnsons-web.com> http://www.alaska-internet-solutions.com

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted