File: Mail.hs

package info (click to toggle)
hugs98 98.200311-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 12,964 kB
  • ctags: 8,084
  • sloc: ansic: 67,521; haskell: 61,497; xml: 4,566; sh: 3,264; cpp: 1,936; yacc: 1,094; makefile: 915; cs: 883; sed: 10
file content (19 lines) | stat: -rw-r--r-- 379 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--
-- SmtpMail.Send example
--
module Mail where

import Dotnet

foreign import dotnet
  "static System.Web.Mail.SmtpMail.Send"
  sendMail :: String  -- fromAddr
  	   -> String  -- toAddr
	   -> String  -- subject
	   -> String  -- body
	   -> IO ()

test from toA = do
 sendMail from toA 
 	  "Hugs98.net test"
	  "<html><body>Greetings from <em>Hugs98.NET</em></body></html>"