Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikibooksThe Free Textbook Project
Search

Rebol Programming/import-email

From Wikibooks, open books for an open world
<Rebol Programming
This page may need to bereviewed for quality.

USAGE:

[edit |edit source]
IMPORT-EMAIL data /multiple parent

DESCRIPTION:

[edit |edit source]

Constructs an email object from an email message.

IMPORT-EMAIL is a function value.

ARGUMENTS:

[edit |edit source]
  • data -- The email message (Type: string)

REFINEMENTS:

[edit |edit source]
  • /multiple -- Collect multiple fields in header
    • parent -- (Type: object)

SOURCE CODE

[edit |edit source]
import-email: func [    "Constructs an email object from an email message."     data [string!] "The email message"     /multiple "Collect multiple fields in header" parent [object!]     /local content frm][    data: parse-header either multiple [parent] [system/standard/email] content: data     frm: func [val /local res] [        either block? val [            either empty? val [                copy ""            ] [                res: copy first val                 foreach addlst next val [                    insert insert tail res ", " addlst                ]                 res            ]        ] [            val        ]    ]     data/date: parse-header-date either block? data/date [first data/date] [data/date]     data/from: parse-email-addrs frm data/from     data/to: parse-email-addrs frm data/to     all [multiple data/cc: parse-email-addrs frm data/cc]     all [multiple data/bcc: parse-email-addrs frm data/bcc]     data/reply-to: parse-email-addrs frm data/reply-to     data/content: any [data/content tail content]     data]
Retrieved from "https://en.wikibooks.org/w/index.php?title=Rebol_Programming/import-email&oldid=3352814"
Category:

[8]ページ先頭

©2009-2025 Movatter.jp