<div dir="ltr">I&#39;ve written a module in Yesod for email[1], but it doesn&#39;t actually rely on any Yesod features, so could be factored out easily. I&#39;ve also written a sample program[2] to go along with it. The main feature is to be able to easily generate multi-part emails. It also includes some code to send an email via createProcess/sendmail.<div>
<br></div><div>If people like this and would like to see it released outside of Yesod, I can easily do so.</div><div><br></div><div>Jeremy:</div><div><br></div><div>It seems strange that SMTPClient uses a String to represent the message body. My module uses a lazy ByteString. I suppose you could always just do a Lazy.Char8.unpack to get the results from my module into SMTPClient.</div>
<div><br></div><div>I like the idea of using markdown, I might try that in the future. As far as the templating, I&#39;m not even touching that one: Yesod.Mail deals exlusively with lazy ByteStrings, and you can generate those however you see fit.</div>
<div><br></div><div>Michael<br><div><br></div><div>[1] <a href="http://github.com/snoyberg/yesod/blob/master/Yesod/Mail.hs">http://github.com/snoyberg/yesod/blob/master/Yesod/Mail.hs</a></div><div><a href="http://github.com/snoyberg/yesod/blob/master/Yesod/Mail.hs"></a>[2] <a href="http://github.com/snoyberg/yesod/blob/master/mail.hs">http://github.com/snoyberg/yesod/blob/master/mail.hs</a><br>
<br><div class="gmail_quote">On Fri, Aug 20, 2010 at 1:33 AM, Clint Moore <span dir="ltr">&lt;<a href="mailto:cmoore@wamboli.com">cmoore@wamboli.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I know it probably sounds terrible, but we&#39;ve gotten away with using<br>
runInteractiveProcess + sendmail for all of our email.  So far it has<br>
worked pretty well.<br>
<br>
That said, if you end up writing such a thing, we would be interested<br>
in testing it.<br>
<div><div></div><div class="h5"><br>
On Thu, Aug 19, 2010 at 11:43 AM, Michael Snoyman &lt;<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>&gt; wrote:<br>
&gt; Hey all,<br>
&gt; I&#39;m wondering what people do in general for sending email, especially from<br>
&gt; web apps. So far, I&#39;ve written some basic modules in my apps that wrap<br>
&gt; around the sendmail executable on the system. Are there packages on Hackage<br>
&gt; that people would recommend?<br>
&gt; As long as I&#39;m bringing this up, I think I nice email system would offer<br>
&gt; built in support for creating multipart messages. Bonus points would be to<br>
&gt; automatically create a text/plain version from an HTML version. If no one<br>
&gt; knows of prior art on this, I might try to implement it as a module in<br>
&gt; Yesod.<br>
&gt; Michael<br>
</div></div>&gt; _______________________________________________<br>
&gt; web-devel mailing list<br>
&gt; <a href="mailto:web-devel@haskell.org">web-devel@haskell.org</a><br>
&gt; <a href="http://www.haskell.org/mailman/listinfo/web-devel" target="_blank">http://www.haskell.org/mailman/listinfo/web-devel</a><br>
&gt;<br>
&gt;<br>
</blockquote></div><br></div></div></div>