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

CMD-140: Make Core-CMS Confirmation E-mail Opt-In Setting #827

Merged
merged 6 commits into from
Mar 29, 2024
Merged

Conversation

R-Tomas-Gonzalez
Copy link
Collaborator

@R-Tomas-Gonzalez R-Tomas-Gonzalez commented Mar 28, 2024

Overview

Adds in a setting to make the email_management app an option. The setting will allow a host cms to overwrite the core_cms confirmation email setting.

Related

Changes

Adds in a simple boolean setting for email_management opt-in

Testing

See #827 (review).

UI

See #827 (review).

@R-Tomas-Gonzalez R-Tomas-Gonzalez self-assigned this Mar 28, 2024
@R-Tomas-Gonzalez R-Tomas-Gonzalez added the effort XS Extra small effort task (~¼ a week) — does not include review time label Mar 28, 2024
@wesleyboar wesleyboar marked this pull request as draft March 28, 2024 23:04
@R-Tomas-Gonzalez R-Tomas-Gonzalez marked this pull request as ready for review March 28, 2024 23:43
Copy link
Member

@wesleyboar wesleyboar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing

Regression test #817:

  1. Add a new form with an email field
  2. Submit form.
  3. Review Docker logs.
  4. Verify log sends email (text and html).

UI

No Setting Change
core_cms                | [DJANGO] DEBUG 2024-03-29 10:30:08,753 UTC apps portal.apps.email_management.apps.callback:48: received submission from Help
core_cms                | Content-Type: multipart/alternative;
core_cms                |  boundary="===============2966335073807060692=="
core_cms                | MIME-Version: 1.0
core_cms                | Subject: Form Submission - Help
core_cms                | From: webmaster@localhost
core_cms                | To: wbomar@tacc.utexas.edu
core_cms                | Date: Fri, 29 Mar 2024 15:30:08 -0000
core_cms                | Message-ID: <171172620875.9.10840462122146237827@core_cms>
core_cms                | 
core_cms                | --===============2966335073807060692==
core_cms                | Content-Type: text/plain; charset="utf-8"
core_cms                | MIME-Version: 1.0
core_cms                | Content-Transfer-Encoding: 7bit
core_cms                | 
core_cms                | 
core_cms                | 
core_cms                | Form: Help
core_cms                | Date: 29th March 2024 10:30
core_cms                | 
core_cms                | 
core_cms                | Email:
core_cms                | wbomar@tacc.utexas.edu
core_cms                | 
core_cms                | 
core_cms                | Sent via http://0.0.0.0:8000
core_cms                | 
core_cms                | --===============2966335073807060692==
core_cms                | Content-Type: text/html; charset="utf-8"
core_cms                | MIME-Version: 1.0
core_cms                | Content-Transfer-Encoding: 7bit
core_cms                | 
core_cms                | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
core_cms                | <html xmlns="http://www.w3.org/1999/xhtml">
core_cms                |     <head>
core_cms                |         <meta name="viewport" content="width=device-width" />
core_cms                |         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
core_cms                |         <title>Form Submission - Help</title>
core_cms                |     </head>
core_cms                |     <body itemscope itemtype="http://schema.org/EmailMessage">
core_cms                |         <h1>Help</h1>
core_cms                |         <p><strong>Date:</strong> 29th March 2024 10:30</p>
core_cms                |         
core_cms                |             <p>
core_cms                |                 <strong>Email:</strong><br/>
core_cms                |                 wbomar@tacc.utexas.edu
core_cms                |             </p>
core_cms                |         
core_cms                |         Sent via <a href="http://0.0.0.0:8000/help/">0.0.0.0:8000/help/</a>
core_cms                |     </body>
core_cms                | </html>
core_cms                | 
core_cms                | --===============2966335073807060692==--
core_cms                | 
core_cms                | -------------------------------------------------------------------------------
core_cms                | [DJANGO] DEBUG 2024-03-29 10:30:08,753 UTC apps portal.apps.email_management.apps.callback:49: <class 'dict'>
core_cms                | [DJANGO] INFO 2024-03-29 10:30:08,753 UTC basehttp django.server.log_message:212: "POST /forms/submit/ HTTP/1.1" 200 66
Set PORTAL_SHOULD_SEND_CONF_EMAIL = True in settings_local.py
core_cms                | ##### SAME OUTPUT AS NO SETTINGS CHANGE PLUS THIS BELOW #####
core_cms                | ...
core_cms                | -------------------------------------------------------------------------------
core_cms                | [DJANGO] DEBUG 2024-03-29 10:35:54,648 UTC apps portal.apps.email_management.apps.callback:49: <class 'dict'>
core_cms                | Content-Type: multipart/alternative;
core_cms                |  boundary="===============5670351882915629752=="
core_cms                | MIME-Version: 1.0
core_cms                | Subject: TACC Form Submission Received: Help
core_cms                | From: no-reply@tacc.utexas.edu
core_cms                | To: wbomar@tacc.utexas.edu
core_cms                | Date: Fri, 29 Mar 2024 15:35:54 -0000
core_cms                | Message-ID: <171172655464.31.14405625476447186347@core_cms>
core_cms                | 
core_cms                | --===============5670351882915629752==
core_cms                | Content-Type: text/plain; charset="utf-8"
core_cms                | MIME-Version: 1.0
core_cms                | Content-Transfer-Encoding: 7bit
core_cms                | 
core_cms                | 
core_cms                |     Greetings,
core_cms                | 
core_cms                |     You have successfully submitted a form on the example.com website. Thank you for your submission.
core_cms                | 
core_cms                |     Sincerely,
core_cms                |     example.com Communications
core_cms                |     
core_cms                | --===============5670351882915629752==
core_cms                | Content-Type: text/html; charset="utf-8"
core_cms                | MIME-Version: 1.0
core_cms                | Content-Transfer-Encoding: 7bit
core_cms                | 
core_cms                | 
core_cms                |     <p>Greetings,</p>
core_cms                |     <p>
core_cms                |     You have successfully submitted a form on the example.com website. Thank you for your submission.
core_cms                |     </p>
core_cms                |     <p>
core_cms                |     Sincerely,<br>
core_cms                |     example.com Communications
core_cms                |     </p>
core_cms                |     
core_cms                | --===============5670351882915629752==--
core_cms                | 
core_cms                | -------------------------------------------------------------------------------
core_cms                | [DJANGO] INFO 2024-03-29 10:35:54,649 UTC basehttp django.server.log_message:212: "POST /forms/submit/ HTTP/1.1" 200 66

@wesleyboar wesleyboar merged commit ad38f22 into main Mar 29, 2024
@wesleyboar wesleyboar deleted the CMD-140 branch March 29, 2024 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort XS Extra small effort task (~¼ a week) — does not include review time
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants