Configuring Issues mail feature


#1

Hi everyone,

I’m trying to configure the reporting issues but I am running into some errors when I am testing when I click on the submit button. I think that my configuration is not right. The only thing I have configured is the mail-to-address.

I am unclear on what, if any, changes I need to make to the code snippet shown in the above pages example.

spring:
  mail:
    host: smtp.gmail.com
    # TLS: 587 SSL: 465 Plain: 25
    port: 465
    username: my_username
    password: my_password
    properties:
      # For StartTLS
      mail.smtp.starttls.enable: true
      # For SSL
      #mail.smtp.socketFactory.class: javax.net.ssl.SSLSocketFactory

Can someone help?


#2

Hi @akenny,

Indeed, you must make some changes to the spring: mail: settings.
To allow Shinyproxy to send out mails, it must have credentials so it can access an SMTP server.

It is possible to use your gmail account for this. Then you have 2 options:

  1. Configure your gmail username and password in the settings. You must also set port: 587 and mail.smtp.starttls.enable: true
    This is a less secure approach, and Google will require you to allow this via the ‘less secure apps’ setting:
    https://myaccount.google.com/lesssecureapps

  2. Use OAuth. This is a more secure approach (no passwords are needed anywhere), but requires quite a bit of setup. See http://chariotsolutions.com/blog/post/sending-mail-via-gmail-javamail/

Regards,
Frederick