Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Bryant Smith   on Nov 05 In Java Category.

  
Question Answered By: Reamonn Fischer   on Nov 05

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

Share: 

 

This Question has 3 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Sending email from my web application Or get search suggestion and latest updates.


Tagged: