Hi Christopher,

so let's try the same here ...

>> REBOL/version              
== 2.1.90.4.2
>> b: system/user/email
== "Ingo Hohmann <[EMAIL PROTECTED]>"
>> type? b
== string!
>> b: to-email b
== Ingo%20Hohmann%20<[EMAIL PROTECTED]>
>> send to-email b "test"
** User Error: Server error: tcp 501 <Ingo Hohmann <[EMAIL PROTECTED]>>: "@" or "." expected 
after "Ingo".
** Where: insert port reduce data

with:

>> source send ; shortened !!!
send: func [
    address [email! block!] "An address or block of addresses" 
    message "Text of message. First line is subject." 
; ...
][
    do-send: func [port data] [insert port reduce data] 
    smtp-port: open [scheme: 'smtp] 
    if email? address [address: reduce [address]] 
    message: content: either string? message [copy message] [mold message] 
    if not header [
        header-obj: make system/standard/email [
            from: system/user/email 
            subject: copy/part message any [find message newline 50]
        ]
    ] 
    if none? header-obj/from [net-error "Email header not set: no from address"] 
    if none? header-obj/to [header-obj/to: make string! 20] 
    if none? header-obj/date [header-obj/date: to-idate now] 
; ...
        foreach addr address [
            if email? addr [
                do-send smtp-port ["MAIL FROM: <" header-obj/from ">"] 
                do-send smtp-port ["RCPT TO: <" addr ">"] 
;
; -----------------------------------------------^
; here it goes, the address is _completely_ surrounded by < > marks
;
                head insert clear header-obj/to addr remove/part message content 
                content: insert message net-utils/export header-obj 
                content: insert content newline 
                do-send smtp-port ["DATA" message]
            ]
        ]
; ...
    close smtp-port
]

are you sure, you use the original send function? I know about a patched
send, that accepts strings like "Real Name <[EMAIL PROTECTED]>".


regards,

Ingo


Those were the words of [EMAIL PROTECTED]:
<...> 
> Now if you convert your string! to an email! like this, it seems to
> work.
> 
>   >> b: system/user/email
>   == "Christopher Elliott <[EMAIL PROTECTED]>"
>   >> type? b
>   == string!
>   >> b: to-email b
>   == Christopher%20Elliott%20<[EMAIL PROTECTED]>
>   >> type? b
>   == email!
<...> 
>   >> send to-email b "this is a test"
>   connecting to: mail.crosswinds.net
>   >>
> 
> This is the raw email that I got back (indented here to separate it
> from this email text...).
> 
>   Received: by dot.crosswinds.net (mbox sembazuru)
>    (with Cubic Circle's cucipop (v1.31 1998/05/13) Sun Oct 17 13:44:57 1999)
>   X-From_: [EMAIL PROTECTED]  Sun Oct 17 13:43:47 1999
>   Return-Path: <[EMAIL PROTECTED]>
>   Received: from phf-pa5-31.ix.netcom.com ([EMAIL PROTECTED] 
>[209.111.193.31])
>           by dot.crosswinds.net (8.9.3/8.9.3) with SMTP id NAA06122
>           for <Christopher Elliott <[EMAIL PROTECTED]>>; Sun, 17 Oct 1999 
>13:43:46 -0400 (EDT)
>           (envelope-from [EMAIL PROTECTED])
>   Message-Id: <[EMAIL PROTECTED]>
>   To: Christopher Elliott <[EMAIL PROTECTED]>
>   From: Christopher Elliott <[EMAIL PROTECTED]>
>   Date: Sun, 17 Oct 1999 13:43:45 -0400
>   Subject: this is a test
>   X-REBOL: 2.1.90.1.1 "The Internet Messaging Language (TM) WWW.REBOL.COM"
> 
>   this is a test
<...>

Reply via email to