Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure SMTP mailer settings #4

Closed
bkiahstroud opened this issue Jun 17, 2024 · 14 comments
Closed

Configure SMTP mailer settings #4

bkiahstroud opened this issue Jun 17, 2024 · 14 comments
Assignees

Comments

@bkiahstroud
Copy link
Collaborator

bkiahstroud commented Jun 17, 2024

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

@bkiahstroud bkiahstroud self-assigned this Jun 17, 2024
@aprilrieger
Copy link

aprilrieger commented Jul 11, 2024

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

  • EMAIL REPLY-TO ADDRESS
  • EMAIL REPLY-TO NAME
  • EMAIL FROM NAME
  • EMAIL FROM ADDRESS
  • SMTP USERNAME
  • SMTP PORT
  • SMTP ADDRESS
  • SMTP PASSWORD
Click to expand/collapse screenshots Screenshot 2024-07-11 at 12 32 43 Screenshot 2024-07-11 at 12 35 14

@aprilrieger
Copy link

Email sent to client requesting information
Screenshot 2024-07-11 at 14 34 27

@aprilrieger aprilrieger added the blocked other work must be completed first label Aug 14, 2024
@bkiahstroud
Copy link
Collaborator Author

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

@kelynch
Copy link

kelynch commented Aug 22, 2024

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

@bkiahstroud bkiahstroud removed the blocked other work must be completed first label Aug 22, 2024
@aprilrieger
Copy link

@kelynch Thank you, I have requested access to the document from my [email protected] email.

@aprilrieger aprilrieger added the blocked other work must be completed first label Aug 22, 2024
@aprilrieger
Copy link

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

@aprilrieger aprilrieger removed the blocked other work must be completed first label Aug 23, 2024
@aprilrieger
Copy link

aprilrieger commented Aug 23, 2024

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

Emailed clients for password

@aprilrieger aprilrieger added the blocked other work must be completed first label Aug 23, 2024
@aprilrieger
Copy link

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

@aprilrieger aprilrieger removed the blocked other work must be completed first label Aug 23, 2024
@jillpe jillpe assigned bkiahstroud and unassigned aprilrieger Sep 16, 2024
@aprilrieger
Copy link

@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
Copy link
Collaborator Author

bkiahstroud commented Sep 27, 2024

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
Copy link

kelynch commented Sep 27, 2024

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

@bkiahstroud bkiahstroud added the blocked other work must be completed first label Sep 27, 2024
@bkiahstroud
Copy link
Collaborator Author

Oh hold pending confirmation of values from client

@kelynch
Copy link

kelynch commented Oct 1, 2024

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

@jillpe jillpe removed the blocked other work must be completed first label Oct 9, 2024
@bkiahstroud
Copy link
Collaborator Author

After logging in as an admin, I clicked the "Send test email" button at the bottom of this page and received it successfully 🎉

This is ready for client QA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants