...
Code Block |
---|
<bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl"> <property name="host" value="outgoing.mit.edu"/> <property name="port" value="587"/> <property name="username" value="USERNAME"/> <property name="password" value="PASSWORD"/> <property name="javaMailProperties"> <props> <prop key="mail.debug">true</prop> <prop key="mail.smtp.auth">true</prop> <prop key="mail.smtp.starttls.enable">true</prop> </props> </property> </bean> |
These The username, password, port, and possibly host, property values should be externalized to a properties file. We can put these properties in machine.properties - apps should pick this up automatically. Only one copy of this props file per server.
...