> Hi, > I'd like to know if there's any Hugs compatible library with > functionalities to send mail.
I don't think so. If all you want to do is send mail from within an haskell program why not just make system calls. I did something like that a long time ago. I've sent you the module in attachment. (suposed to work in *nixes) J.A.
> import System Este ficheiro contem fucoes para eu enviar mails aos meus alunos > type Mail = String Mails das Turmas P3 e P4 - posso ter que alterar para filtrar alunos > mails_P3 :: [Mail] > mails_P3 = ["mp0" ++ show(n) ++ "@mat.uc.pt" | n <- [301.. 336] ] > mails_P4 :: [Mail] > mails_P4 = ["mp0" ++ show(n) ++ "@mat.uc.pt" | n <- [401.. 407] ] Mails das minhas turmas Praticas > mails_TP :: [Mail] > mails_TP = mails_P3 ++ mails_P4 Enviar mails: > type Subject = String > type Path = String > type Message = String Envia dados: - Subject da mensagem - Path do ficheiro com a mensagem - Endereco de e-mail Envia o mail com subj. e mensagens dadas para o endereco. > sendmail :: Subject -> Path -> Mail -> IO ExitCode > sendmail sub msgfile e_mail > = do > --putStrLn(comando) > system( comando ) > > where comando = "mail -s \"" ++ sub ++"\" "++ e_mail ++ " < " ++ msgfile > send_to_list :: Subject -> Path -> [Mail] -> IO [ExitCode] > send_to_list sub msgfile e_mails > = do > sequence (map (sendmail sub msgfile) e_mails)