if you use Spring, you can send email by it Classes.
Firstly, you must set some beans as you can see below:
<bean id="mailSender"
class="org.springframework.mail.javamail.JavaMailSenderImpl">
<property name="host" value="${hostname}"/>
<property name="username"
value="${username}"/>
<property name="password"
value="${password}"/>
<property name="port" value="25"/>
</bean>
<bean id="mailMessage"
class="org.springframework.mail.SimpleMailMessage"
singleton="false">
<property name="from"
value="orodsem@..."/>
</bean>
after that, you must call them in your Service tier
and enjoy it. So easy