lookit / lookit-api

Codebase for Lookit v2 and Experimenter v2. Includes an API. Docs: http://lookit.readthedocs.io/
https://lookit.mit.edu/
MIT License
10 stars 18 forks source link

QA: Send all emails from MIT domain #1358

Closed becky-gilbert closed 5 months ago

becky-gilbert commented 6 months ago

Summary

We recently found out that we need to change the way that we handle emails from researchers to study participants (via the study's 'contact participants' page) in order to meet new email deliverability requirements. Emails sent from researchers via the Contact Participants page are now sent from the lookit MIT email address (same address as the automated emails), with the lab email in the "reply-to" field instead of "from". This change is now live on the staging site.

QA

Here are the things to check on staging:

1. Custom messages sent from a researcher/study to participant

2. Other emails that should be affected by this change

All of the emails types below were previously sent from a lab email address and should now be sent from lookit-staging-bot@mit.edu. We should check at least a few of these to make sure that (1) the email is delivered in response to the action, and (2) the email is sent from the MIT address instead of the lab address. (These emails do not include the lab contact as the 'reply-to' address, so no need to check that.)

3. Other emails that should NOT be affected by this change

The following types of emails should work the same as before (i.e. still sent from lookit-staging-bot email address and no separate reply-to address). We should check at least a few of these to make sure that they're still working.

Minimal JSON protocol for a test study

{
    "frames": {
        "video-consent": {
            "kind": "exp-lookit-video-consent",
            "template": "consent_005",
            "PIName": "Jane Smith",
            "institution": "Science University",
            "PIContact": "Jane Smith at 123 456 7890",
            "purpose": "Why do babies love cats? This study will help us find out whether babies love cats because of their soft fur or their twitchy tails.",
            "procedures": "Your child will be shown pictures of lots of different cats, along with noises that cats make like meowing and purring. We are interested in which pictures and sounds make your child smile. We will ask you (the parent) to turn around to avoid influencing your child's responses.",
            "payment": "After you finish the study, we will email you a $5 BabyStore gift card within approximately three days. To be eligible for the gift card your child must be in the age range for this study, you need to submit a valid consent statement, and we need to see that there is a child with you. But we will send a gift card even if you do not finish the whole study or we are not able to use your child's data! There are no other direct benefits to you or your child from participating, but we hope you will enjoy the experience.",
            "datause": "We are primarily interested in your child's emotional reactions to the images and sounds. A research assistant will watch your video to measure the precise amount of delight in your child's face as he or she sees each cat picture.",
            "research_rights_statement": "You are not waiving any legal claims, rights or remedies because of your participation in this research study.  If you feel you have been treated unfairly, or you have questions regarding your rights as a research subject, you may contact the [IRB NAME], [INSTITUTION], [ADDRESS/CONTACT]"
        },
        "exit-survey": {
            "kind": "exp-lookit-exit-survey",
            "debriefing": {
                "title": "Thank you!",
                "text": "PLACEHOLDER DEBRIEFING TEXT. SEE DOCS FOR ADVICE ON WHAT TO INCLUDE HERE."
            }
        }
    },
    "sequence": [
        "video-consent",
        "exit-survey"
    ]
}
becky-gilbert commented 5 months ago

I tested the first item here (Custom messages sent from a researcher/study to participant) on staging and found that everything is working as it should be. The email was sent from the lookit bot email address, with the lab email as the reply-to address. The only thing I wasn't able to check was that participant replies were actually sent to and received by the lab email address, because I don't have access to any of the lab email accounts. Is someone else able to check this?

I can also confirm that I tested a few emails in the third category above (emails that should NOT be affected by this change), such as study status change and experiment build messages, and these are still working fine.

ianchandlercampbell commented 5 months ago

Seems to be working as intended! The initial email came from lookit-staging-bot and replying went directly the the lab email. My account email and lab email are the same so Gmail bundled them. Can do additional testing with a second email in a bit.

Image

becky-gilbert commented 5 months ago

Closed via #1357 and #1366