urbit/sur/rfc.hoon

21 lines
473 B
Plaintext
Raw Normal View History

:: This structure is the hoon equivalent of the RFC 822 E-mail message format
|%
2016-02-20 01:47:09 +03:00
++ message {from/email-address to/email-address subject/@t body/@t}
++ email-address {name/@t domain/@t}
--
2016-11-17 04:42:58 +03:00
::
|%
2016-02-20 01:47:09 +03:00
++ email-adr-to-text |=({name/@t domain/@t} (trip (rap 3 name '@' domain ~)))
++ message-to-rfc822
2016-02-20 01:47:09 +03:00
|= a/message ^- cord
%- crip
"""
From: {(email-adr-to-text from.a)}
To: {(email-adr-to-text to.a)}
Subject: {(trip subject.a)}
{(trip body.a)}
"""
--