scientist-softserv / princeton-manifold

Transforming scholarly publications into living digital works.
http://manifoldapp.org
GNU General Public License v3.0
0 stars 0 forks source link

Configure SMTP mailer settings #4

Open bkiahstroud opened 3 months ago

bkiahstroud commented 3 months ago

Story

The application currently attempts to send emails using Sendmail, which throws an error.

Instead, we want to configure the application to send emails via SMTP. Relevant settings can be found here:

(If configuring SMTP via the application settings, verify the settings persist between r2 pod restarts / deployments)

Credentials are in 1Password title: SMTP Info for Manifold OpenPublishing

aprilrieger commented 2 months ago

What are we using to get smtp setup? Does the client have any of these handy?

aprilrieger commented 2 months ago

Email sent to client requesting information

Screenshot 2024-07-11 at 14 34 27
bkiahstroud commented 1 month ago

Client should be sending over all info for this today except the password. The password will be provided ASAP

kelynch commented 1 month ago

Details here - https://docs.google.com/document/d/15FT3UHb1QHEVTQsPOJNgOe9T9KCx93uDxkVJ-s6Rs54/edit

aprilrieger commented 1 month ago

@kelynch Thank you, I have requested access to the document from my april@scientist.com email.

aprilrieger commented 1 month ago

Received access to the document shared, I am unblocked now.

aprilrieger commented 1 month ago

Needing the SMTP PASSWORD Coming from Hannah separately Blocked till I hear back with password.

Emailed clients for password

aprilrieger commented 1 month ago

Unblocked and in 1password title: SMTP Info for Manifold OpenPublishing.

aprilrieger commented 1 week ago

@bkiahstroud I didn't get around to this, but I can def try on Monday. A priority ticket got unblocked and I wanted to get a script running over the weekend.

bkiahstroud commented 4 days ago

Attempting to send mail using the first SMTP address provided (lib-ponyexpr-prod.princeton.edu) throws this error:

TestMailer.test(current_user).deliver_now

I, [2024-09-27T17:50:26.595647 #10916]  INFO -- : Delivered mail 66f6f04490b23_2aa42a8052575@princeton-manifold-production-api-rails-855d867c85-t2p5f.mail (30003.4ms)
APIExceptions::StandardError: Manifold was unable to send the email. The exception was of the type
           "Net::OpenTimeout." The message was "execution expired." Double check your
          configuration.
from /opt/manifold/api/lib/dynamic_mailer/mailer.rb:39:in `handle_exception'
Caused by Net::OpenTimeout: execution expired
from /usr/local/bundle/gems/net-smtp-0.4.0/lib/net/smtp.rb:631:in `initialize'

Attempting to use the fallback SMTP address provided (smtp.princeton.edu) results in this error:

TestMailer.test(current_user).deliver_now

I, [2024-09-27T17:57:25.064078 #10916]  INFO -- : Delivered mail 66f6f20214634_2aa42a805272e@princeton-manifold-production-api-rails-855d867c85-t2p5f.mail (2980.9ms)
APIExceptions::StandardError: Manifold wasn't able to authenticate against the SMTP server using the stored credentials.
from /opt/manifold/api/lib/dynamic_mailer/mailer.rb:39:in `handle_exception'
Caused by Net::SMTPAuthenticationError: Net::SMTPAuthenticationError
from /usr/local/bundle/gems/net-smtp-0.4.0/lib/net/smtp/authenticator.rb:34:in `finish'

In the meeting today, my plan is to confirm the SMTP values provided by the client before digging into Manifold further.

kelynch commented 4 days ago

We're using the lib-openpublish Service account credentials.

bkiahstroud commented 4 days ago

Oh hold pending confirmation of values from client

kelynch commented 5 hours ago

Different values sent securely, let me know if you cannot access.