2016-02-20 00:44:52 +03:00
|
|
|
:: 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-20 00:44:52 +03:00
|
|
|
--
|
2016-02-24 07:54:14 +03:00
|
|
|
!:
|
2016-02-20 00:44:52 +03:00
|
|
|
|%
|
2016-02-20 01:47:09 +03:00
|
|
|
++ email-adr-to-text |=({name/@t domain/@t} (trip (rap 3 name '@' domain ~)))
|
2016-02-20 00:44:52 +03:00
|
|
|
++ message-to-rfc822
|
2016-02-20 01:47:09 +03:00
|
|
|
|= a/message ^- cord
|
2016-02-20 00:44:52 +03:00
|
|
|
%- crip ^- tape %- sifo
|
|
|
|
%- crip
|
|
|
|
"""
|
|
|
|
From: {(email-adr-to-text from.a)}
|
|
|
|
To: {(email-adr-to-text to.a)}
|
|
|
|
Subject: {(trip subject.a)}
|
|
|
|
|
|
|
|
{(trip body.a)}
|
|
|
|
"""
|
|
|
|
--
|