Configuring Issues mail feature

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?

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

2 Likes

Hello,

Above solution is little bit older and difficult to understand. Can anyone please provide simple solution for this please?

Atlast was able to find the solution

in application.yml file add the below in proxy block (top of the file)


support:
mail-to-address: some.user@somedomain.com


then at the bottom in the spring block add the below.

mail:
host: smtp.gmail.c om
port: 587
username: yr_id@ gmail.com
password: yr auth password
protocol: smtp
tls: true
properties:
mail.smtp.starttls.enable: true
mail.smtp.trust: smtp.gmail.c om