AI Zusammenfassung
Beschreibung
Die wpforms_emails_mailer_get_reply_to_address
Filter können Sie die Reply-To-E-Mail-Adresse für das Addon User Registration ändern, das in WPForms-E-Mails verwendet wird.
Parameter | Typ | Beschreibung |
---|---|---|
$reply_to | String | Die aktuelle Reply-To-Adresse, die WPForms verwenden soll. Geben Sie eine andere Zeichenfolge, um es zu überschreiben. |
$email | Objekt | Die Instanz des E-Mail-Objekts. Ermöglicht den Zugriff auf E-Mail-Vorlagen und -Eigenschaften. |
Quelle
wpforms/src/Emails/Mailer.php
Beispiel
/**
* Set a custom Reply-To address for User Registration emails only.
*
* @link https://wpforms.com/developers/wpforms_emails_mailer_get_reply_to_address/
*
* @param string $reply_to Current Reply-To address.
* @param object $email The email object instance.
*
* @return string
*/
function wpf_dev_user_registration_reply_to( $reply_to, $email ) {
// Target User Registration general notifications.
if ( isset( $email->template )
&& $email->template instanceof \WPFormsUserRegistration\EmailNotifications\Templates\General ) {
// Use a dedicated inbox for replies from registration emails.
$reply_to = '[email protected]';
}
return $reply_to;
}
add_filter( 'wpforms_emails_mailer_get_reply_to_address', 'wpf_dev_user_registration_reply_to', 10, 2 );