retroforth/example/mail.forth
crc c58165d6ff example: using mail vix unix pipes
FossilOrigin-Name: d6be495fe089f27ad41bab38c9a9350fc5cd8e73450de2d1043f1103b163209b
2019-04-17 19:07:33 +00:00

17 lines
373 B
Forth

This is a tiny wrapper over the `mail` application to allow
sending emails from within RETRO.
~~~
:mail:send (sss-)
swap 'mail_-s_"%s"_%s s:format file:W unix:popen ;
swap [ over file:write ] s:for-each unix:pclose ;
~~~
# Send a Message
```
(Body 'This_is_a_test\n\nSending_mail_via_RETRO s:format
(Subject 'Test
(Recipient 'crc@forthworks.com
mail:send
```