<div>Hey Cody,<br><br>Awesome Job! Very mucho awesome job.<br> </div><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">3. From Lincoln on having the EmailAttachment as an interface.<br>
<br>
    I&#39;m not really sure how useful this is going to be as you are<br>
going to have to implement quite a few methods.<br></blockquote>
<br>I&#39;m not stuck on this one. It&#39;s a simple enough class, but you can never be too safe, and it&#39;s difficult to go back :) Forge tells us that there are only 6 methods that need to be in the interface. *wink*<br>

<br><div style="margin-left: 40px;">
[seam-mail-api-base] EmailAttachment.java $ ls<br><br>
[methods]<br>
public::getBytes()::byte[]<br>
public::getContentDisposition()::ContentDisposition<br>
public::getContentId()::String<br>
public::getFileName()::String<br>
public::getHeaders()::Collection&lt;Header&gt;<br>
public::getMimeType()::String<br></div>
<br>It would be pretty straight-forward if you did want to break these out into their own interface and move the implentation (still in the api-base package) to BaseEmailAttachment. You could also add a reference to this default implementation in the JavaDocs. Again, just an idea. It really probably isn&#39;t a big deal since all you need to do is transform your data into the object you&#39;ve already provided. I&#39;d love to get Dan&#39;s expert opinion ;)<br>
<br>One more thing. It looks like you are doing some UUID work in this class here? <br><br>  public EmailAttachment(  String fileName,  String mimeType,  ContentDisposition contentDisposition,  byte[] bytes){<br>    this.contentId=UUID.randomUUID().toString();<br>
    this.fileName=fileName;<br>    this.mimeType=mimeType;<br>    this.contentDisposition=contentDisposition;<br>    this.bytes=bytes;<br>  }<br><br>If you were to move Attachments to an interface, this might be something that needs to move to the EmailMessage impl itself. That might be another reason either for or against this, but something to consider :) Anyway. I&#39;m done! Doesn&#39;t really matter either way I think.<br>
<br>Cheers! And again, awesome job!<br><br>--LB3<br><br><div class="gmail_quote">On Sun, Feb 27, 2011 at 6:22 PM, Cody Lerum <span dir="ltr">&lt;<a href="mailto:cody.lerum@gmail.com">cody.lerum@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">1. From Lincoln<br>
<br>
Utilizing an Interface for handling the different ways one could<br>
create an email template. -<br>
<a href="https://issues.jboss.org/browse/SEAMMAIL-19" target="_blank">https://issues.jboss.org/browse/SEAMMAIL-19</a><br>
<br>
    This is Done.<br>
<br>
VelocityMailMessage vmm = velocityMailMessage.get();<br>
<br>
      vmm.from(&quot;seam@test.test&quot;, &quot;Seam Framework&quot;)<br>
            .to(person)<br>
            .subject(&quot;HTML Message from Seam Mail - &quot; +<br>
java.util.UUID.randomUUID().toString())<br>
            .bodyHtml(new VelocityClassPathTemplate(&quot;template.html.vm&quot;))<br>
            .put(&quot;version&quot;, &quot;Seam 3&quot;)<br>
            .importance(MessagePriority.HIGH)<br>
            vmm.send(session.get());<br>
<br>
   the contact fields also support a interface as well so one only<br>
need implement a getName and getAddress method on their User entity<br>
(for example) in order to pass it directly into an email -<br>
<a href="https://github.com/seam/mail/blob/6f70057cca7da712576c21f44bda80082ae1f0a1/examples/sendmail/src/main/java/org/jboss/seam/mail/example/Person.java" target="_blank">https://github.com/seam/mail/blob/6f70057cca7da712576c21f44bda80082ae1f0a1/examples/sendmail/src/main/java/org/jboss/seam/mail/example/Person.java</a><br>

<br>
2. From Emmanuel<br>
<br>
  a. the from and all contact fields already support a single argument<br>
being the address<br>
  b. the ability to have a var args  to(&quot;<a href="mailto:emmanuel@nothingtosee.org">emmanuel@nothingtosee.org</a>&quot;,<br>
&quot;<a href="mailto:dan@test.com">dan@test.com</a>&quot;) is something we could do, but we would have to ditch<br>
the to(&quot;Dan&quot;, &quot;<a href="mailto:dan@test.com">dan@test.com</a>&quot;). People would have to create personal +<br>
address recipients via something like to(new BaseEmailContact(&quot;Dan&quot;.<br>
&quot;<a href="mailto:dan@test.com">dan@test.com</a>&quot;)...more on that further down<br>
  c. all the contact methods (from/to/cc/bcc/replyto) all support<br>
collections being passed into them.<br>
  d. I&#39;ve added an a no arg send() method<br>
  e. Typesafe templating is going to have to come later and I&#39;m going<br>
to need to lean on someone for inspiration.<br>
<br>
3. From Lincoln on having the EmailAttachment as an interface.<br>
<br>
    I&#39;m not really sure how useful this is going to be as you are<br>
going to have to implement quite a few methods.<br>
<br>
4. From José Rodolfo Carrijo de Freitas reguarding no arg send()<br>
<br>
   This has been added.<br>
<br>
5. From Dan via ALR reguarding ordering of the name and address in<br>
contact methods<br>
<br>
   I&#39;ve reordered everything to aways takes Address first and then Name if any.<br>
<br>
   to(&quot;<a href="mailto:cody@test.com">cody@test.com</a>&quot;)<br>
   to(&quot;<a href="mailto:cody@test.com">cody@test.com</a>&quot;, &quot;Cody&quot;)<br>
<br>
<br>
Thats what I have for now. The one question I have is do we just drop<br>
the ability to do<br>
<br>
   to(&quot;<a href="mailto:cody@test.com">cody@test.com</a>&quot;, &quot;Cody&quot;)<br>
<br>
and require<br>
<br>
  to(new BaseEmailContact(&quot;<a href="mailto:cody@test.com">cody@test.com</a>&quot;, &quot;Cody&quot;)<br>
<br>
this would allow a var args address only to/from/cc/bcc/replyTo<br>
<br>
Thus you could do:<br>
<br>
to(&quot;<a href="mailto:cody@test.com">cody@test.com</a>&quot;)<br>
to(&quot;<a href="mailto:cody@test.com">cody@test.com</a>&quot;, &quot;<a href="mailto:dan@test.com">dan@test.com</a>&quot;)<br>
<br>
but anything with the acutal name would need to be done with<br>
<br>
to(new BaseEmailContact(&quot;<a href="mailto:cody@test.com">cody@test.com</a>&quot;, &quot;Cody&quot;)<br>
<br>
Of course if people are using existing objects it would be easier to<br>
just implement the EmailContact interface<br>
<br>
User user = new User(&quot;Cody&quot;, &quot;<a href="mailto:cody@test.com">cody@test.com</a>&quot;, RoleType.ADMIN);<br>
<br>
to(user);<br>
<br>
Thoughts?<br>
<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><br>
</blockquote></div><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>&quot;Keep it Simple&quot;<br>