install postfix (mail server)

1.sudo apt update
2.sudo apt-get install postfix
3.choose Internet Site
4.type localhost
 
5.Java servlet setting
<beans:bean id=”mailSender” class=”org.springframework.mail.javamail.JavaMailSenderImpl”>
<!– SMTP settings –>
<beans:property name=”host” value=”smtp.gmail.com” />
<beans:property name=”port” value=”587″ />
<beans:property name=”username” value=”bdgamingglobal@gmail.com” />
<beans:property name=”password” value=”jwetywgwbepvmpoz” />
<beans:property name=”javaMailProperties”>
<!– additional properties specific to JavaMail –>
<beans:props>
<beans:prop key=”mail.transport.protocol”>smtp</beans:prop>
<beans:prop key=”mail.smtp.auth”>true</beans:prop>
<beans:prop key=”mail.smtp.starttls.enable”>true</beans:prop>
<beans:prop key=”mail.debug”>true</beans:prop>
</beans:props>
</beans:property>
</beans:bean>
 
reference from https://linadonis.pixnet.net/blog/post/7340997