send&email insanity
[1/7] from: chalz::earthlink::net at: 6-Mar-2003 15:47
Okay, I'm officially about to go insane. Check this out. (BTW, the only
reason I'm altering email addresses is protection against harvesters using
escribe):
>> outmsg/to: [me--me--net]
== [me--me--net]
>> outmsg/to
== [me--me--net]
>> probe outmsg
make object! [
To: [me--me--net]
CC: [[person1--me--net] "," [person2--you--net]]
BCC: none
From: [me--me--net]
Reply-To: [me--me--net]
Date: "Thu, 6 Mar 2003 14:54:31 -0500"
Subject: "New Test!"
Return-Path: none
Organization: none
Message-Id: none
Comment: none
X-REBOL: "Core 2.5.3.3.1 http://WWW.REBOL.COM"
MIME-Version: none
Content-Type: none
Content: none
]
>> send/header outmsg/to mesg outmsg
;;; mesg is just a string
connecting to: mail.me.net
>> outmsg/to
>> probe outmsg
make object! [
To:
CC: [[person1--me--net] "," [person2--you--net]]
BCC: none
From: [me--me--net]
Reply-To: [me--me--net]
Date: "Thu, 6 Mar 2003 14:54:31 -0500"
Subject: "New Test!"
Return-Path: none
Organization: none
Message-Id: none
Comment: none
X-REBOL: "Core 2.5.3.3.1 http://WWW.REBOL.COM"
MIME-Version: none
Content-Type: none
Content: none
]
?!?!? Where did the To field go?!?
Help me before I drop my computer out the window! :P
--Charles
[2/7] from: gscottjones:mchsi at: 6-Mar-2003 17:25
Hi, Charles,
From: "Charles"
> Okay, I'm officially about to go insane.
Cool, can we watch? :)
> ...Check this out. (BTW, the only
> reason I'm altering email addresses is protection against harvesters using
<<quoted lines omitted: 7>>
> To: [me--me--net]
> CC: [[person1--me--net] "," [person2--you--net]]
...
> Content: none
> ]
<<quoted lines omitted: 3>>
> >> outmsg/to
> ==
...
> ?!?!? Where did the To field go?!?
> Help me before I drop my computer out the window! :P
Good question. I would be shocked if this one hasn't shown up. I can more
easily show you wehre the problem is arising, than why. Look at the source
of the send function. In fact save a copy to a file (it will be helpful in
a moment).
echo %/pathtomyfile/send.r
source send
echo none
When you look at the send function, near the bottom, you will see a section
that looks like:
...
foreach addr address [
if email? addr [
do-send smtp-port ["MAIL FROM: <" from ">"]
do-send smtp-port ["RCPT TO: <" addr ">"]
if not show [insert clear header-obj/to addr]
that last line is the problem. Before the line is called, the header-obj/to
and addr both still exist. After that line is called, they both disappear.
This suggests a context issue. A context-ologist may be able to explain
why
(or tell me why it is something else).
It looks like a buglet to me, but I am not certain.
A fix is to change that line to:
if not show [header-obj/to: copy addr]
Clean up the top and bottom of this file to only include the function
definition and then load this replacement for send.
I, too, would like to know from a context-ologist what is happening here,
and has this been reported, and should it be reported.
Hope this helps a bit.
--Scott Jones
[3/7] from: lmecir:mbox:vol:cz at: 7-Mar-2003 9:05
Hi Charles, Scott, myself and all,
> From: "Charles"
> > Okay, I'm officially about to go insane.
I think, that everyone using SEND has (at least once) been "caught" by this bug. I confess,
that I have been too lazy to send my observations to the public and I lazily "circumvented"
the bug.
> Cool, can we watch? :)
> > ...Check this out. (BTW, the only
<<quoted lines omitted: 39>>
> "why" (or tell me why it is something else).
> It looks like a buglet to me, but I am not certain.
you may safely be certain
> A fix is to change that line to:
> if not show [header-obj/to: copy addr]
<<quoted lines omitted: 4>>
> Hope this helps a bit.
> --Scott Jones
You correctly found the bug and suggested the fix. I think, that even
if not show [header-obj/to: addr]
fixes the behaviour. Please send your fix to the feedback.
Now to "why"
---------------
As a context-ologist I must state: it isn't a context issue. :-P
Actually, it is an identity issue. :-)
The bug has been "induced" by the desired behaviour. I think, that the desired behaviour
was to change the HEADER object to contain only one address (- the address ADDR of the
present receiver), while the ADDRESS argument of SEND was supposed to contain addresses
of more receivers.
To "achieve" the goal, the buggy code tries to clear the HEADER/TO attribute and append
the current ADDR to it. The bug shows itself, when ADDR and HEADER/TO are identical strings.
Then the CLEAR function clears the HEADER/TO string and therefore it clears the ADDR
string. The fact, that we append the ADDR string to the HEADER/TO string doesn't help.
Hope it explains the issue.
Thanks for the fix and for sending it to the feedback, Scott.
-L
[4/7] from: lmecir:mbox:vol:cz at: 7-Mar-2003 9:31
Hi all and myself,
please replace "receiver" by "recipient" in my previous mail and excuse my bad english.
Scott, after the fix, even the:
if none? header-obj/to [
header-obj/to: tmp: make string! 20
if show [
foreach email address [repend tmp [email ", "]]
clear back back tail tmp
]
]
can be changed to:
if all [show none? header-obj/to] [
header-obj/to: tmp: make string! 20
foreach email address [repend tmp [email ", "]]
clear back back tail tmp
]
Regards
-L
[5/7] from: gscottjones:mchsi at: 7-Mar-2003 7:54
From: "Ladislav Mecir"
...
>> It looks like a buglet to me, but I am not certain.
> you may safely be certain
>>
>> A fix is to change that line to:
>> if not show [header-obj/to: copy addr]
...
>You correctly found the bug and suggested the fix. I think, that even
>
> if not show [header-obj/to: addr]
>
>fixes the behaviour. Please send your fix to the feedback.
Thanks, Ladislav. I sent this minor bug through feedback page:
Feedback Id #337549330
> Actually, it is an identity issue. :-)
Oh, no, an identity crisis!!! :-)
>... while the ADDRESS argument of SEND was
> supposed to contain addresses of more receivers.
Yes, of course, that seems obvious now. I frankly did not notice it
yesterday. That clarifies one issue for me personally.
> Hope it explains the issue.
Yes, it did. Thanks!
--Scott Jones
[6/7] from: gscottjones:mchsi at: 7-Mar-2003 8:01
From: "Ladislav Mecir"
> ...please replace "receiver" by "recipient" in my
> previous mail and excuse my bad english.
You english is fine. No problem.
> Scott, after the fix, even the:
> if none? header-obj/to [
<<quoted lines omitted: 10>>
> clear back back tail tmp
> ]
Stepping through the function, I agree that logically this works and seems
more stream-lined. Limited testing also shows it works. I decided not to
submit this on the same feedback request, because I believe that it is
better to keep a feedback to a very limited scope. The only side effect of
leaving it as it is that REBOL generates a 20 character string space without
then using it (if show is not specified). If there is a more harmful side
effect, then perhaps it should be submitted separately. I guess the
submission could reference the other feedback ticket for clarity. What do
you think? (Given limited REBOL resources I am inclined to let it slide.)
Respectfully,
--Scott Jones
[7/7] from: lmecir:mbox:vol:cz at: 7-Mar-2003 15:46
Hi Scott,
> I decided not to
> submit this on the same feedback request, because I believe that it is
> better to keep a feedback to a very limited scope.
you are right. Don't repair something, that isn't broken.
Thanks
-L
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted