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

Hi,

I am using ShinyProxy 3.0.2 and I cannot configure the Report Issue via smtp. I have this configured and working correctly in Keycloak, so I know my host, username, password, and starttls is configured correctly.

In my ShinyProxy log, I am told smtp is not correctly configured. Any ideas? Note that I could not find options for tls, protocol, and mail.smtp.trust in the help documentation, which was referenced above (possibly applicable to an older version of shinyproxy).

Here is my application.yml content related to the question:
proxy:
support:
mail-to-address: my_email@org
mail-from-address: my_email@org

spring:
# E-mail server settings.
mail:
host: smtp.provider.com
port: 587
username: my_username
password: my_pwd
properties:
mail.smtp.starttls.enable: true

To test, please use your google email. Many things are blocked in official google domains. Don’t forget to create an auth password.

Thank you Alok_Kr_Singh for your response. I realized I had the spring block of code nested under proxy, when it should not have been. Also, apologies for not formatting the code in my post correctly; I recently signed up to this list and I did not realize my mistake until after posted. I have provided the code below in case my solution helps someone else. thank you!

Here is my application.yml content related to the question:

proxy:
  support:
    mail-to-address: my_email@org
    mail-from-address: my_email@org

spring:
  # E-mail server settings.
  mail:
    host: [smtp.provider.com](http://smtp.provider.com/)
    port: 587
    username: my_username
    password: my_pwd
  properties:
    mail.smtp.starttls.enable: true