These notes are for setting up a SMTP Authentication for Drupal sites hosted on Pantheon. Pantheon provides a nice tool for securing API Keys and other credentials, so they do not need to be stored in configuration files as plain text.
The function pantheon_get_secret() may be used to fetch the value of a single secret.
if (function_exists('pantheon_get_secret')) {
$smtp_password = pantheon_get_secret('smtp_password');
if ($smtp_password) {
$config['smtp.settings']['smtp_password'] = $smtp_password;
}
}
// Set Secret, escape the password if neededterminus secret:site:set rsvp-system-org smtp_password 2600\;haxorz --scope=web
// show secretsterminus secret:site:list rsvp-system-org
// delete, use if you need to adjust scopeterminus secret:site:delete rsvp-system-org-house api-key