shrub/gen/gmail/send.hoon

16 lines
447 B
Plaintext
Raw Normal View History

2016-10-22 02:44:39 +03:00
:: Send e-mail via gmail API
2016-02-24 06:55:55 +03:00
::
:::: /hoon/send/gmail/gen
::
/? 310
/- rfc
:- %say
2016-04-15 04:36:48 +03:00
|= {^ {to/tape subject/tape opt/$@($~ {mess/tape $~})} _from="urbit-test@gmail.com"}
2016-02-24 06:55:55 +03:00
:- %gmail-req
:^ %post /messages/'send' ~['uploadType'^'simple']
^- message:rfc
=+ parse-adr=;~((glue pat) (cook crip (star ;~(less pat next))) (cook crip (star next)))
:+ (scan from parse-adr)
(scan to parse-adr)
2016-04-15 04:36:48 +03:00
[(crip subject) ?~(opt '' (crip mess.opt))]