<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EstiloDeEmail17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=PT-BR link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>It
Looks really nice!<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>If
I may suggest something, maybe we can add the possibility to use just <b>“.send()”</b>
( keeping the send(session) method ).<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>If
there’s no specific session argument, the module could handle the
injection within itself.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>Best regards,<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>José Rodolfo Carrijo de Freitas<br>
Analista de Sistemas<br>
Softplan - Departamento de pesquisa e desenvolvimento<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>Sistema da Qualidade Certificado ISO 9001:2008<br>
(48) 3027 8000 Ramal 8359<br>
<a href="http://www.softplan.com.br"><span style='color:blue'>http://www.softplan.com.br</span></a></span><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>De:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
seam-dev-bounces@lists.jboss.org [mailto:seam-dev-bounces@lists.jboss.org] <b>Em
nome de </b>Lincoln Baxter, III<br>
<b>Enviada em:</b> segunda-feira, 7 de fevereiro de 2011 17:33<br>
<b>Para:</b> Dan Allen<br>
<b>Cc:</b> Seam Mailing List<br>
<b>Assunto:</b> Re: [seam-dev] Is this the mail API you always wanted?<o:p></o:p></span></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'>Cody,<br>
<br>
This look EXCELLENT.<br>
<br>
I have one question/potential suggestion so far regarding:<br>
<br>
<b>.subjectHTMLFromClassPath("subject.html.vm") </b><br>
<b>.templateHTMLFromClassPath("template.html.vm") </b><br>
<br>
and related methods.<br>
<br>
Have you considered creating an abstraction here that alows for pluggable
template resolvers? Otherwise you have this "explosion" of methods in
the interface that may end up causing maintenance woes. However, if you
replaced this with something like:<br>
<br>
<b>.template(new
HtmlFromClassPath("template.html.vm"))</b><br>
<b>.subject(new
HtmlFromClassPath("subject.html.vm")) </b><br>
<br>
People would be empowered to implement a simple interface with limitless
extension possibilities.<br>
<br>
Thoughts?<br>
~Lincoln<o:p></o:p></p>
<div>
<p class=MsoNormal>On Mon, Feb 7, 2011 at 1:57 PM, Dan Allen <<a
href="mailto:dan.j.allen@gmail.com">dan.j.allen@gmail.com</a>> wrote:<o:p></o:p></p>
<p class=MsoNormal>Seam devs,<o:p></o:p></p>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>Cody is looking for some feedback on the mail module [1]
before he drafts a reference guide and puts the API on ice.<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>Seam mail is important because, let's face it, the Java Mail
API needs a makeover. Thankfully, the CDI programming model offers the
necessary hooks to create a modernized mail API capable of deep integration
with the Java EE platform (specifically the Java Mail API and container-managed
sessions).<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>Seam Mail offers a fluent API that makes sending e-mail in
Java a painless experience. But an e-mail is nothing without the content.
That's why Seam Mail offers several templating options, such as Velocity, as
well as an extensible template SPI, to allow you to select your templating
solution of choice. With Seam Mail, you'll be sending e-mail from your
application in no time.<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>Is this how you imagined it would be?<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>Basic:<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<div>
<p class=MsoNormal> @Inject<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> private Instance<MailMessage>
mailMessage;<o:p></o:p></p>
</div>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<div>
<p class=MsoNormal> @Inject<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> private Session session;<o:p></o:p></p>
</div>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<div>
<p class=MsoNormal> mailMessage.get()<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> .from("Seam
Framework", "<a href="mailto:seam@jboss.org" target="_blank">seam@jboss.org</a>")<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> .to("John
Smith", "<a href="mailto:john.smith@acme.com" target="_blank">john.smith@acme.com</a>")<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> .subject("Text
Message from Seam Mail - " + java.util.UUID.randomUUID().toString())<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> .textBody(text)<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> .send(session);<o:p></o:p></p>
</div>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>Velocity:<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<div>
<p class=MsoNormal> @Inject<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> private Instance<VelocityMailMessage>
velocityMailMessage;<o:p></o:p></p>
</div>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<div>
<p class=MsoNormal> @Inject<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> private Session session;<o:p></o:p></p>
</div>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<div>
<p class=MsoNormal> velocityMailMessage.get().from("Seam
Framework", "<a href="mailto:seam@jboss.org" target="_blank">seam@jboss.org</a>")<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> .to(person.getName(),
person.getEmail())<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> .subject("HTML
Message from Seam Mail - " + java.util.UUID.randomUUID().toString())<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>
.templateHTMLFromClassPath("template.html.vm")<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> .put("version",
"Seam 3")<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>
.importance(MessagePriority.HIGH)<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> .addAttachment(new
URL("<a
href="http://www.seamframework.org/themes/sfwkorg/img/seam_icon_large.png"
target="_blank">http://www.seamframework.org/themes/sfwkorg/img/seam_icon_large.png</a>"),
"seamLogo.png", ContentDisposition.INLINE);<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> .send(session);<o:p></o:p></p>
</div>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>We look forward to your feedback.<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>-Dan<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>[1] <a href="http://github.com/seam/mail" target="_blank">http://github.com/seam/mail</a><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><a href="http://seamframework.org/Seam3/Mail" target="_blank">http://seamframework.org/Seam3/Mail</a><br
clear=all>
<br>
-- <o:p></o:p></p>
<div>
<p class=MsoNormal>Dan Allen<o:p></o:p></p>
</div>
<p class=MsoNormal style='margin-bottom:12.0pt'>Principal Software Engineer,
Red Hat | Author of Seam in Action<br>
Registered Linux User #231597<o:p></o:p></p>
<div>
<p class=MsoNormal><a href="http://www.google.com/profiles/dan.j.allen#about"
target="_blank">http://www.google.com/profiles/dan.j.allen#about</a><br>
<a href="http://mojavelinux.com" target="_blank">http://mojavelinux.com</a><br>
<a href="http://mojavelinux.com/seaminaction" target="_blank">http://mojavelinux.com/seaminaction</a><o:p></o:p></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<p class=MsoNormal style='margin-bottom:12.0pt'><br>
_______________________________________________<br>
seam-dev mailing list<br>
<a href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/seam-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/seam-dev</a><o:p></o:p></p>
</div>
<p class=MsoNormal><br>
<br clear=all>
<br>
-- <br>
Lincoln Baxter, III<br>
<a href="http://ocpsoft.com">http://ocpsoft.com</a><br>
<a href="http://scrumshark.com">http://scrumshark.com</a><br>
"Keep it Simple"<o:p></o:p></p>
</div>
</body>
</html>