Mercurial > email
view examples/test.ur @ 2:bf58106560ba
Carriage returns at ends of messages; more .hgignore for Autotools
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sat, 27 Dec 2014 07:17:50 -0500 |
parents | 33bf7ee17644 |
children |
line wrap: on
line source
fun sendPlain r = Mail.send (Mail.from r.From (Mail.to r.To (Mail.subject r.Subject Mail.empty))) r.Body None; return <xml>Sent</xml> fun sendHtml r = Mail.send (Mail.from r.From (Mail.to r.To (Mail.subject r.Subject Mail.empty))) r.Body (Some <xml><a href={url (main ())}>Spread the love!</a></xml>); return <xml>Sent</xml> and main () = return <xml><body> <h2>Plain</h2> <form> From: <textbox{#From}/><br/> To: <textbox{#To}/><br/> Subject: <textbox{#Subject}/><br/> Body: <textarea{#Body}/><br/> <submit action={sendPlain}/> </form> <h2>HTML</h2> <form> From: <textbox{#From}/><br/> To: <textbox{#To}/><br/> Subject: <textbox{#Subject}/><br/> Body: <textarea{#Body}/><br/> <submit action={sendHtml}/> </form> </body></xml>