charts icon indicating copy to clipboard operation
charts copied to clipboard

[bitnami/discourse] Discourse E-Mail setup

Open junoriosity opened this issue 2 years ago • 0 comments

Name and Version

bitnami/discourse 8.0.4

What steps will reproduce the bug?

Install the helm chart with the following values

discourse:
  extraEnvVars:
    - name: DISCOURSE_SMTP_ADDRESS
      value: "smtp-relay.sendinblue.com"
    - name: DISCOURSE_SMTP_PORT
      value: "587"
    - name: DISCOURSE_NOTIFICATION_EMAIL
      value: "[email protected]"
    - name: DISCOURSE_SMTP_USER_NAME
      value: "[email protected]"
    - name: DISCOURSE_SMTP_PASSWORD
      value: "my-pw"
    - name: DISCOURSE_SMTP_DOMAIN
      value: "my-domain.com"

Are you using any custom parameters or values?

No response

What is the expected behavior?

The e-mails should be sent.

What do you see instead?

I tried to send a test e-mail to my gmail account from the admin panel. This is what I got:

smtp_2

So it does not work by now.

These are the logs from the Discourse container:

Processing by Admin::UsersController#show as JSON
  Parameters: {"id"=>"1"}
Completed 200 OK in 1978ms (Views: 0.6ms | ActiveRecord: 0.0ms | Allocations: 195416)
Started GET "/groups/search.json" for 10.0.0.50 at 2022-08-10 11:55:05 +0000
Processing by GroupsController#search as JSON
Completed 200 OK in 1189ms (Views: 0.5ms | ActiveRecord: 0.0ms | Allocations: 133325)
Started GET "/admin/email.json" for 10.0.0.50 at 2022-08-10 11:55:17 +0000
Processing by Admin::EmailController#index as JSON
Completed 200 OK in 23ms (Views: 1.2ms | ActiveRecord: 0.0ms | Allocations: 864)
Started POST "/admin/email/test" for 10.0.0.50 at 2022-08-10 11:55:20 +0000
Processing by Admin::EmailController#test as */*
  Parameters: {"email_address"=>"[email protected]"}
Completed 422 Unprocessable Entity in 20ms (Views: 1.1ms | ActiveRecord: 0.0ms | Allocations: 2037)
Started GET "/about.json" for 10.0.0.47 at 2022-08-10 11:55:46 +0000
Processing by AboutController#index as JSON
Completed 200 OK in 67ms (Views: 0.3ms | ActiveRecord: 0.0ms | Allocations: 9503)
Started GET "/site/basic-info.json" for 10.0.0.47 at 2022-08-10 11:55:46 +0000
Processing by SiteController#basic_info as JSON
Completed 200 OK in 254ms (Views: 0.5ms | ActiveRecord: 0.0ms | Allocations: 33103)
Started GET "/site/basic-info.json" for 10.0.0.47 at 2022-08-10 11:55:47 +0000
Processing by SiteController#basic_info as JSON
Completed 200 OK in 80ms (Views: 0.8ms | ActiveRecord: 0.0ms | Allocations: 4260)

and when I shuttle in the container and execute the following

RAILS_ENV=production bundle exec rails c

irb(main):002:0> message = TestMailer.send_test("[email protected]")
Traceback (most recent call last):
        2: from app/mailers/test_mailer.rb:7:in `send_test'
        1: from lib/email/build_email_helper.rb:8:in `build_email'
ArgumentError (:arguments expected to be an Array of individual string args)

an error shows up, which should normally not be the case.

Do you know how to fix that issue?

Additional information

No response

junoriosity avatar Aug 10 '22 16:08 junoriosity

Hi @junoriosity

Have you taken a look to this thread?

fmulero avatar Aug 11 '22 08:08 fmulero

Hi @fmulero

many thanks for getting back to me. Well, I did the env variable setting very similar.

However, the whole testing procedure outlined there is difficult as the dir structure is quite different from the one I tend to find in my pods.

For instance, when running

telnet smtp.mailgun.org 587

it tells me

root@discourse-69c7f5475c-h9qf5:/# cd opt/bitnami/discourse/
root@discourse-69c7f5475c-h9qf5:/opt/bitnami/discourse# telnet smtp.mailgun.org 587
bash: telnet: command not found

Do you have a suggestion how I could test this and other things in the pod I find after using the bitnami helm chart?

junoriosity avatar Aug 11 '22 09:08 junoriosity

Please, note that the Bitnami team is not actively monitoring GitHub Issues for this Helm chart. This issue will stay open for 20 days to allow the community to contribute, after 15 days without activity the issue will be marked as stale, being closed after 5 days.

If you would like to contribute to this Helm chart by fixing a bug or adding a new feature, feel free to create a PR, the Bitnami team will be happy to review it and provide feedback.

carrodher avatar Aug 12 '22 10:08 carrodher

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

bitnami-bot avatar Aug 28 '22 01:08 bitnami-bot

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

bitnami-bot avatar Sep 03 '22 01:09 bitnami-bot