Added support for template emails

git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/trunk/portlets/user/join-vre@148650 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2017-05-15 09:03:21 +00:00
parent 11e0450b5e
commit d558bff0ea
6 changed files with 61 additions and 1616 deletions

View File

@ -4,6 +4,9 @@
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<dependent-module archiveName="email-templates-library-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/email-templates-library/email-templates-library">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
<property name="context-root" value="join-vre"/>
</wb-module>

View File

@ -1,6 +1,7 @@
<ReleaseNotes>
<Changeset component="org.gcube.portlets-user.join-vre.3.3.0" date="2017-05-03">
<Changeset component="org.gcube.portlets-user.join-vre.3.3.0" date="2017-05-15">
<Change>Ported to Java8</Change>
<Change>Added support for template emails</Change>
</Changeset>
<Changeset component="org.gcube.portlets-user.join-vre.3.2.0" date="2016-11-17">
<Change>Removed ASL Session</Change>

View File

@ -13,7 +13,7 @@
<groupId>org.gcube.portlets.user</groupId>
<artifactId>join-vre</artifactId>
<packaging>war</packaging>
<version>3.3.1-SNAPSHOT</version>
<version>3.3.0-SNAPSHOT</version>
<name>gCube Join VRE Portlet</name>
<description>Display the available VRE to Join</description>
<scm>
@ -56,6 +56,11 @@
<version>${gwtVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.portal.mailing</groupId>
<artifactId>email-templates-library</artifactId>
<version>[1.0.0-SNAPSHOT,)</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>

File diff suppressed because one or more lines are too long

View File

@ -1,20 +0,0 @@
STEP 1:
open link “http://foundation.zurb.com/emails/inliner.html” and paste $yourfile.html code inside the textarea provided.
Click on “Convert Email” button.
Remove the complete <style> tag from $yourfile.html, we do not need <style> tag since all our css classes have been assigned to the HTML tags as inline styles.
STEP 2:
Encode everything Base64 with an online tool: e.g. https://www.base64encode.org
Use the encoded string in the code then sthe like:
byte[] base64DecodedData = Base64.getDecoder().decode(encodedTemplate);
String template = new String(base64DecodedData)
.replace("{{SELECTED_VRE_NAME}}", selectedVRE)
.replace("{{USER_NAME}}", name)
.replace("{{OPTIONAL_MESSAGE}}", optionalMessage);
body.append(template);

File diff suppressed because it is too large Load Diff