Skip to content

README names SMTP_WHITELIST but the module reads SMTP_FROM_WHITELIST #41

Description

@nicksantamaria

The README names the SMTP sender allowlist environment variable SMTP_WHITELIST, but the module code reads SMTP_FROM_WHITELIST:

  • README:
    emails configured in SMTP_WHITELIST envvar.
  • Constant used by the module:
    const BAY_PLATFORM_DEPENDENCIES_ENV_SMTP_ALLOWLIST = "SMTP_FROM_WHITELIST";
  • Read in the install file:
    // Add values from SMTP_FROM_WHITELIST environment variable if it exists.
    $whitelist = getenv('SMTP_FROM_WHITELIST');
    if ($whitelist) {
    $whitelistEmails = explode(',', $whitelist);
    // Trim whitespace from each email.
    $whitelistEmails = array_map('trim', $whitelistEmails);
    // Add whitelisted emails to valid values.
    $validValues = array_merge($validValues, $whitelistEmails);
    $message[] = $translation->translate('Added @count email addresses from SMTP_FROM_WHITELIST to valid values.',

Please update the README to SMTP_FROM_WHITELIST (or change the code, if the README name is the intended one).

The generated SDP Platform Docs follow the code and currently flag this conflict on https://expert-adventure-33ypwm8.pages.github.io/reference/bay-platform-dependencies/. Once the README matches, the docs correct themselves on the next docs run.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions