jhu-idc / iDC-general

Contains non-code-base specific tickets relating to the Islandora8 for Digital Collection project
0 stars 0 forks source link

unable to send email message from the iDC interface #463

Closed htpvu closed 2 years ago

htpvu commented 2 years ago

Failing test case 7.4 https://docs.google.com/document/d/1UdKV_4Voe5jPU1LHEJhAi-61ngU1JHlkKtmwI7cHwo4/edit

Error message "unable to send message. contact system admin if the problem persists."

htpvu commented 2 years ago

Steps to replicate:

  1. Visit this link https://test.digital.library.jhu.edu/node/186
  2. Click "Ask the Collection Admin" button
  3. Fill out the contact form, click send
Screen Shot 2022-01-06 at 1 51 26 PM
htpvu commented 2 years ago

@jhujasonw here's some info on the email not working.

jhujasonw commented 2 years ago

Let me take a look and see what is happening in the container if I can figure out why it cannot send mail

jhujasonw commented 2 years ago

A small piece I was unaware of, in order to send mail, all the email recipents have to be verified. I am not sure yet what exactly that means, but I will look into it more tomorrow.

jabrah commented 2 years ago

There's a setting requiring new users to be verified at /admin/config/people/accounts. No idea if it's related, but its the only thing in Drupal (core) that mentions user verification

image

jhujasonw commented 2 years ago

Ah-ha! Come to find out the AWS SES (Simple Email Service) has not been taken out of sandbox mode. When in sandbox mode, the recipients are limited to verified email addresses. I know I submitted a request to have the thing taken out of sandbox mode, but it appears that it didn't happen for some reason and I did not get an email as to why. I am submitting it again to see if I can get it setup. Might take a day or so for AWS to approve it.

jhujasonw commented 2 years ago

Oh wow, that was quick and very very annoying:

Thank you for submitting your request to increase your sending limits. We are unable to grant your request at this time because we do not have enough information about your use case.

If you can provide additional information about how you plan to use Amazon SES, we may be able to grant your request. In your response, include as much detail as you can about your email-sending processes and procedures.

For example, tell us how often you send email, how you maintain your recipient lists, and how you manage bounces, complaints, and unsubscribe requests. It is also helpful to provide examples of the email you plan to send so we can ensure that you are sending high-quality content.

Can anyone help me describe in detail what type of email this thing is going to be sending? A single sentence about sending notifications is not helpful, as that's what I put in the initial request. I am afraid I do not know how this is going to be used so I need some input.

bseeger commented 2 years ago

I can't predict how much either of the contact pages will be used, but it should be low volume and is protected from nefarious users with the CAPTCHA test.

bseeger commented 2 years ago

They sound like they are worried we are maintaining email lists - we will not be via this system. We are creating paths for users to send email to the admins of our system.

jabrah commented 2 years ago

Only thing I can comment on is that we might want to make it clear that the contact pages (Contact Us and Leave Feedback or Ask an Admin forms) are publicly available, requiring only the CAPTCHA test

htpvu commented 2 years ago

also:

jhujasonw commented 2 years ago

Merging the comments from everyone, this is what I will try to send to AWS:

htpvu commented 2 years ago

adding links to ticket and prs relating to email implementation for future references https://github.com/jhu-idc/idc-isle-buildkit/pull/63 https://github.com/jhu-idc/idcApp-k8s/pull/89 https://github.com/jhu-idc/idcApp-k8s/issues/86

jhujasonw commented 2 years ago

I was just able to send a message using @htpvu example above. I had to go in and set the FROM address in the UI for drupal, which I thought Elliot's env vars were supposed to do. I'll double check that those env vars are set, but if they are and that value is not getting set properly, that is a bug and needs to be looked at.

It looks like my test email went to specialcollections@lists.jhu.edu

jhujasonw commented 2 years ago

I just checked, the test instance does have the DRUPAL_SMTP_FROM_ADDRESS set per Elliot's PR for sending mail, but the Drupal site config didn't have it set to that as the from address, which is a bug.

htpvu commented 2 years ago

@jhujasonw for the purpose of testing this feature on TEST, could you please set the collection Admins emails to katie's and mine? Maps and Atlases: hanh.vu@jhu.edu other collections: kgucer@jhu.edu

jhujasonw commented 2 years ago

I do not know 100% where those get set, those should be set by someone with collection admin access to the collections you want to set them on.

jabrah commented 2 years ago

AFAIK the email forms should be trying to get the email addresses from the collectionAdminContact (or similarly named) field, set from the admin interface by anyone with the correct permissions

htpvu commented 2 years ago

@jhujasonw this did work with the env var work around. so i'm going to close this ticket and create a new ticket for the env var issue