title: Sending smtp emails with SpringBoot application
body: <p>I have a basic SpringBoot 2.0.5.RELEASE app. Using Spring Initializer, JPA, embedded Tomcat, Thymeleaf template engine, and package as an executable JAR file.</p>
  
  <p>I've configured the springboot properties as follows:</p>
  
  <pre><code>spring.mail.host=smtp.gmail.com
  spring.mail.username=nunet@gmail.com
  spring.mail.password=nunet999!
  spring.mail.properties.mail.smtp.auth = true
  spring.mail.properties.mail.smtp.socketFactory.port = 465
  spring.mail.properties.mail.smtp.socketFactory.class = javax.net.ssl.SSLSocketFactory
  spring.mail.properties.mail.smtp.socketFactory.fallback = false
  spring.mail.propertirs.mail.smtp.ssl.enable = true
  </code></pre>
  
  <p>and It is working fine when sending emails. I also have an email address from my domain info@nunet.com</p>
  
  <p>I am using Postfix to forward the Emails from info@nunet.com to  to nunet@gmail.com and its working fine.</p>
  
  <p>I would like to know if there is a way to do it on the other way around. Send emails from info@nunet.com but using nunet@gmail.com smtp to avoid to install a Mail server. </p>
  
  <p>or basically I would like to know how to extract the smtp properties from my linux server, because from there I can send emails using the command</p>
  
  <pre><code>cat ~/test_message | mail -s 'Test email subject line' nunet@gmail.com
  </code></pre>