retroforth/example/mail.forth
crc 690ce4ed36 examples: fix bug in mail.forth
FossilOrigin-Name: 1c8faed670c65885b2eeec91e8ab37f52394f649d2fe84d33497c27a2b8f2a2d
2019-05-03 14:51:35 +00:00

17 lines
371 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
```