urbit/sur/rfc.hoon

21 lines
475 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-02-24 07:54:14 +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)}
"""
--