如果Divi主题使用wp_mail()
函数(很可能是这样),您可以使用wp_mail
筛选器将您自己的参数传递给函数:
function filter_divi_mail( $args ) {
// Modify the options here
$custom_mail = array(
\'to\' => $args[\'to\'],
\'subject\' => $args[\'subject\'],
\'message\' => $args[\'message\'],
\'headers\' => $args[\'headers\'],
\'attachments\' => $args[\'attachments\'],
);
// Return the value to the original function to send the email
return $custom_mail;
}
add_filter( \'wp_mail\', \'filter_divi_mail\' );