Page MenuHomeIn-Portal Phabricator
  • Changed Files
  • branches/5.2.x/core/kernel/utility/email.php

INP-1830 - Clear incompletely configured e-mail on error
ClosedPublic

Authored by alex on Oct 3 2022, 10:22 AM.

Details

Test Plan

Preparations

  1. open /index.php file for editing
  2. replace the $application->Run(); line with this code (replace e-mails with different working e-mails you can access):
$application->emailUser(
    'TEST.EMAIL',
    null,
    array(
        'to_email' => 'email-one@dev-domain',
        'use_custom_design' => 1,
        'message' => '',
    )
);

$application->emailUser(
    'TEST.EMAIL',
    null,
    array(
        'to_email' => 'email-two@dev-domain',
        'use_custom_design' => 1,
        'message' => 'non-empty',
    )
);
  1. save changes
  2. login to the Admin Console
  3. go to the Website & ContentE-mail Templates section
  4. create a new e-mail template with this data:
    • Template Name: TEST.EMAIL
    • Subject: Empty email
    • HTML Version: <inp2:m_Param name="message"/>

Test Plan

  1. visit the /index.php file from the Web Browser to trigger the e-mail sending code
  2. login to the Admin Console
  3. go to the User ManagementMailings section
  4. press the Process Queue toolbar button on the Email Queue tab
  5. confirm (in your e-mail client), that:
    • e-mail to the email-one@dev-domain e-mail wasn't sent
    • e-mail to the email-two@dev-domain e-mail was sent and it was the only recipient of that e-mail

Diff Detail

Repository
rINP In-Portal
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

alex created this revision.Oct 3 2022, 10:22 AM
alex requested review of this revision.Oct 3 2022, 10:22 AM
alex edited the test plan for this revision. (Show Details)Oct 3 2022, 10:31 AM
alex edited the test plan for this revision. (Show Details)
alex added a project: Restricted Project.Oct 3 2022, 10:35 AM
erik accepted this revision.Oct 7 2022, 2:16 AM
This revision is now accepted and ready to land.Oct 7 2022, 2:16 AM
This revision was automatically updated to reflect the committed changes.