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

Introduce separate envvars for SMTP host & port instead of SMTP_ADDRESS #286

Open
tormi opened this issue May 24, 2022 · 0 comments
Open

Comments

@tormi
Copy link
Member

tormi commented May 24, 2022

Let's introduce separate envvars for SMTP host & port instead of SMTP_ADDRESS:

value: RELEASE-NAME-mailhog:1025

Consider this scenario:

/**
 * Default SMTP settings.
 *
 * Mailhog address in Silta SMTP_ADDRESS env-variable is
 * in form 'hostname:port'. We need them separately.
 */
if (getenv('SILTA_CLUSTER')) {
  $smtp_address_parts = explode(':', getenv('SMTP_ADDRESS'));
  if (!empty($smtp_address_parts[0]) && !empty($smtp_address_parts[1])) {
    $config['smtp.settings']['smtp_host'] = $smtp_address_parts[0];
    $config['smtp.settings']['smtp_port'] = $smtp_address_parts[1];
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant