Skip to content

Commit 57ed574

Browse files
authored
Merge pull request #4966 from meuhland/meuhland-add-dkim-passphrase
Add support for passphrase for DKIM private key
2 parents e40e36d + 5b17d77 commit 57ed574

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

app/config/mail.conf.dist.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
$platform_email['DKIM_DOMAIN'] = 'mydomain.com'; //the domain for e-mail sending, not necessarily api_get_path(WEB_PATH)
4141
$platform_email['DKIM_PRIVATE_KEY_STRING'] = ''; //the private key in a string format
4242
$platform_email['DKIM_PRIVATE_KEY'] = ''; //the private key as the path to a file. The file needs to be accessible to PHP!
43+
$platform_email['DKIM_PASSPHRASE'] = ''; //the passohrase for the private key defined in the last 2 lines
4344
// Some e-mail clients do not understand the descriptive LD+JSON format,
4445
// showing it as a loose JSON string to the final user. If this is your case,
4546
// you might want to set the variable below to 'false' to disable this header.

main/inc/lib/api.lib.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9775,6 +9775,9 @@ function api_mail_html(
97759775
}
97769776
$mail->DKIM_private_string = api_get_mail_configuration_value('DKIM_PRIVATE_KEY_STRING');
97779777
$mail->DKIM_private = api_get_mail_configuration_value('DKIM_PRIVATE_KEY');
9778+
if (!empty(api_get_mail_configuration_value['DKIM_PASSPHRASE'])) {
9779+
$mail->DKIM_passphrase = api_get_mail_configuration_value['DKIM_PASSPHRASE'];
9780+
}
97789781
}
97799782

97809783
// Send the mail message.

0 commit comments

Comments
 (0)