Conversation
try { | ||
EmailBuilder builder = new EmailBuilder(emailContext); | ||
InternetAddress to = new InternetAddress(this.email, this.name, UTF_8.name()); | ||
builder.sendMessage(new EmailActivationEmailStrategy(key), to, null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be going through the EmailService
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, it could, but right now I'm just trying for a 1 to 1 conversion, so initially only the parts which already used EmailService are using it.
Besides, the EmailStrategies and EmailBuilder contain all the smarts, EmailService doesn't really bring anything useful to the party.
// JSF can't handle varargs, hence the need for these overloaded methods: | ||
public String format(String key, Object arg1) { | ||
return format(key, new Object[] {arg1}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit of a hole in EL. I wonder if/when they plan to address this.
Review finished. |
Eliminate redundant template "email_activation.vm". Rename EmailUtil -> Addresses and use it more. Rename EmailBuilderStrategy -> EmailStrategy. Move all EmailStrategy classes to top-level under org.zanata.email. Ensure that all emails go through EmailService and get FacesMessages from Msgs so that they can be localised.
commit bae62c5 looks good 👍 |
|
It looks like the Reply-To header is also the wrong way around. |
@djansen-redhat The above 3 bugs should be handled by these commits. |
✅ I've tested this, only a review of the last few commits is required and it can be merged. |
@carlosmunoz could you please take a look at the last four commits? |
👍 Reviewed last 4 commits. |
#534 Squashed commit of the following: commit cd0fbee Author: Sean Flanigan <sflaniga@redhat.com> Date: Tue Jul 22 14:14:35 2014 +1000 Update unit test: HTML should appear after text commit 58f956a Author: Sean Flanigan <sflaniga@redhat.com> Date: Fri Jul 18 18:10:50 2014 +1000 Add @autocreate to injected components commit d035448 Author: Sean Flanigan <sflaniga@redhat.com> Date: Fri Jul 18 18:08:27 2014 +1000 Construct Reply-To correctly commit 8ee323c Author: Sean Flanigan <sflaniga@redhat.com> Date: Fri Jul 18 17:58:24 2014 +1000 Add HTML mail part after text; produce text version of the HTML body commit bae62c5 Author: Sean Flanigan <sflaniga@redhat.com> Date: Mon Jul 14 17:13:36 2014 +1000 Refactor email-handling code and fix injection of mailSession Eliminate redundant template "email_activation.vm". Rename EmailUtil -> Addresses and use it more. Rename EmailBuilderStrategy -> EmailStrategy. Move all EmailStrategy classes to top-level under org.zanata.email. Ensure that all emails go through EmailService and get FacesMessages from Msgs so that they can be localised. commit 8365f53 Author: Sean Flanigan <sflaniga@redhat.com> Date: Mon Jul 14 12:22:28 2014 +1000 Make EmailBuilder into a component commit 6f9ec47 Author: Sean Flanigan <sflaniga@redhat.com> Date: Fri Jul 11 12:46:36 2014 +1000 Use Velocity to generate email
Merged with
|
No description provided.