Improve collaboration mail.

This commit is contained in:
Paulo Gustavo Veiga
2012-06-13 23:04:29 -03:00
parent c4d2acec7b
commit 226a7a0ff9
23 changed files with 260 additions and 137 deletions

View File

@@ -24,33 +24,21 @@ database.password=
#------------------------
# Plain SMTP Server Configuration
#------------------------
#mail.smtp.socketFactory.class=javax.net.DefaultSocketFactory
#mail.smtp.socketFactory.port=25
#mail.smtp.auth = false
#mail.host=localhost
#mail.user=
#mail.password=
#------------------------
# SSL SMTP Server Configuration
#------------------------
# mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory
#mail.smtp.socketFactory.port=465
#mail.smtp.auth = false
#mail.host=localhost
#mail.user=
#mail.password=
#------------------------
# GMAIL SMTP Configuration
#------------------------
mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory
mail.smtp.socketFactory.port=587
mail.smtp.auth = true
mail.host=smtp.gmail.com
mail.user=example@gmail.com
mail.password=
mail.smtp.port=587
mail.smtp.host=smtp.gmail.com
mail.username=pveiga@gmail.com
mail.password=p0w3rwdgg
mail.smtp.auth=true
mail.smtp.starttls.enable=true
mail.smtp.quitwait=false
#------------------------
# Domain address

View File

@@ -1,6 +1,6 @@
log4j.rootLogger=WARN, stdout, R
log4j.logger.com.wisemapping=WARN,stdout,R
log4j.logger.org.springframework=DEBUG,stdout,R
log4j.logger.org.springframework=WARN,stdout,R
log4j.logger.org.codehaus.jackson=WARN,stdout,R
log4j.additivity.org.hibernate.SQL=false

View File

@@ -1,22 +1,41 @@
<html>
<body>
<h3>Welcome to WiseMapping!</h3>
<p>
Your account has been activated.
First Name: ${user.firstname}
Last Name: ${user.lastname}
Username: ${user.username}
</p>
<p>
Thank you for using WiseMapping.
</p>
<p>
For questions or concerns regarding your account, send us an email to support@wisemapping.com.
</p>
<p>
Best regards, <br/>
WiseMapping Team
<a href="http://www.wisemapping.com">WiseMapping Site</a>
</p>
<div style="background-color: #d1e4f0; max-width: 650px; font-family: Arial, sans-serif; color: #000; padding: 5px;">
<div style="height: 36px; font-size: 14px; font-weight: bold; padding-bottom: 4px;">
<table style="display: inline;width: 100%;">
<tbody>
<tr>
<td height="35px" width="2px" style="padding: 0; padding-right: 5px; text-align:center">
<img src="https://ssl.gstatic.com/docs/documents/share/images/services/document-1.png"
alt="Document"/>
</td>
<td valign="middle" height="32px" style="padding: 0;">I've shared <a
href='https://docs.google.com/document/d/1kx48Yhpt01y2LZnIVGJNgKTg_IlvQMh=47R2NIwRn4Hg/edit'>Untitled
document
</a>
</td>
</tr>
</tbody>
</table>
</div>
<div style="font-size: 13px; background-color: #FFF; padding: 10px 7px 7px 7px;">
Click to open:
<ul style="list-style-type: none; padding: 0; margin: 0;">
<li style="margin: 0;">
<a href="https://docs.google.com/document/d/1kx48Yhpt01y2LZnIVG=JNgKTg_IlvQMh47R2NIwRn4Hg/edit">Untitled
document</a></li>
</ul>
<span style="color: #898989;">Google Docs makes it easy to create, store and share online documents, spreadsheets and presentations.</span>
<div style="text-align: right;">
<a href="https://docs.google.com">
<img style="border: 0;margin-top: 10px;"
src="https://ssl.gstatic.com/docs/documents/share/images/services/docs_logo-1.gif"
alt="Logo for Google Docs"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@@ -1,24 +1,29 @@
<html>
<body>
<h3>Welcome to WiseMapping!</h3>
<p>
To active your account and verify your e-mail address, please click on the following link.
To active your account and verify your e-mail address, please click on the following link.
</p>
<a href="${emailcheck}">${emailcheck}</a>
<a href="${emailcheck}">${emailcheck}</a>
</p>
<p>
If you have received this mail by error, you do not need to take any action to cancel the account. The account will not be activated, and you will not receive any futher emails.
If you have received this mail by error, you do not need to take any action to cancel the account. The account will
not be activated, and you will not receive any futher emails.
</p>
<p>
If clicking the link above does not work, copy and paste the URL in a new browser window instead.
If clicking the link above does not work, copy and paste the URL in a new browser window instead.
</p>
<p>
For questions or concerns regarding your account, send us an email to support@wisemapping.com.
For questions or concerns regarding your account, send us an email to support@wisemapping.com.
</p>
<p>
Cheers, <br/>
The WiseMapping Team.
<a href="http://www.wisemapping.com">WiseMapping Site</a>
Cheers, <br/>
The WiseMapping Team.
<a href="http://www.wisemapping.com">WiseMapping Site</a>
</p>
</body>
</html>
</html>

View File

@@ -1,7 +0,0 @@
<html>
<body>
<p>
${message}
</p>
</body>
</html>

View File

@@ -0,0 +1,37 @@
<html>
<body>
<div style="background-color: #fbeed5; max-width: 650px; font-family: Arial, sans-serif; color: #000; padding: 5px;">
<div style="height: 36px; font-size: 14px; font-weight: bold; padding-bottom: 4px;">
<table style="display: inline;width: 100%;">
<tbody>
<tr>
<td height="35px" width="2px" style="padding: 0; padding-right: 5px; text-align:center">
<img src="${mapEditUrl}" alt="Mindmap"/>
</td>
<td valign="middle" height="32px" style="padding: 0;">I've shared <a href='${mapEditUrl}'>
${mindmap.title}</a> mindmap with you.
</td>
</tr>
</tbody>
</table>
</div>
<div style="font-size: 13px; background-color: #FFF; padding: 10px 7px 7px 7px;">
#if( ! $message )
<p>${message}</p>
#end
<p>Click to open: <a href="${mapEditUrl}">${mindmap.title}</a></p>
<span style="color: #898989;">WiseMapping makes it easy to create, store and share online mindmap.</span>
<div style="text-align: right;">
<a href="${baseUrl}">
<img style="border: 0;margin-top: 10px;"
src="${baseUrl}/images/logo-small.png"
alt="WiseMapping Log"/>
</a>
</div>
</div>
</div>
</body>
</html>

View File

@@ -2,6 +2,12 @@
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="mailer" class="com.wisemapping.mail.Mailer" singleton="true">
<constructor-arg index="0" value="${mail.registrationEmail}"/>
<constructor-arg index="1" value="${mail.siteEmail}"/>
<property name="mailSender" ref="mailSender"/>
<property name="velocityEngine" ref="velocityEngine"/>
</bean>
<bean id="userServiceTarget" class="com.wisemapping.service.UserServiceImpl">
<property name="userManager" ref="userManager"/>
@@ -24,7 +30,7 @@
<bean id="mindMapServiceTarget" class="com.wisemapping.service.MindmapServiceImpl">
<property name="mindmapManager" ref="mindmapManager"/>
<property name="userService" ref="userService"/>
<property name="mailer" ref="mailer"/>
<property name="notificationService" ref="notificationService"/>
</bean>
<bean id="mindmapService"
@@ -40,37 +46,19 @@
<property name="target" ref="mindMapServiceTarget"/>
</bean>
<bean id="smtpAuthenticator" class="com.wisemapping.mail.SmtpAuthenticator">
<constructor-arg value="${mail.user}"/>
<constructor-arg value="${mail.password}"/>
</bean>
<bean id="mailSession" class="javax.mail.Session" factory-method="getInstance">
<constructor-arg>
<bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
<property name="host" value="${mail.smtp.host}"/>
<property name="port" value="${mail.smtp.port}"/>
<property name="protocol" value="smtp"/>
<property name="username" value="${mail.username}"/>
<property name="password" value="${mail.password}"/>
<property name="javaMailProperties">
<props>
<prop key="mail.smtp.auth">${mail.smtp.auth}</prop>
<prop key="mail.smtp.socketFactory.port">${mail.smtp.socketFactory.port}</prop>
<prop key="mail.smtp.socketFactory.class">${mail.smtp.socketFactory.class}</prop>
<prop key="mail.smtp.socketFactory.fallback">false</prop>
<prop key="mail.smtp.quitwait">false</prop>
<prop key="mail.smtp.debug">true</prop>
<prop key="mail.smtp.starttls.enable">${mail.smtp.starttls.enable}</prop>
<prop key="mail.smtp.quitwait">${mail.smtp.quitwait}</prop>
</props>
</constructor-arg>
<constructor-arg ref="smtpAuthenticator"/>
</bean>
<bean id="mailer" class="com.wisemapping.mail.Mailer" singleton="true">
<constructor-arg index="0" value="${mail.registrationEmail}"/>
<constructor-arg index="1" value="${mail.siteEmail}"/>
<property name="mailSender" ref="mailSender"/>
<property name="velocityEngine" ref="velocityEngine"/>
</bean>
<bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
<property name="host" value="${mail.host}"/>
<property name="session" ref="mailSession"/>
</property>
</bean>
<bean id="velocityEngine" class="org.springframework.ui.velocity.VelocityEngineFactoryBean">
@@ -81,4 +69,10 @@
</value>
</property>
</bean>
<bean id="notificationService" class="com.wisemapping.mail.NotificationService" singleton="true">
<property name="baseUrl" value="${site.baseurl}"/>
<property name="mailer" ref="mailer"/>
</bean>
</beans>