Setting the Sender Name, Email, and Reply-To Address in WordPress without a plugin

6 November 2025

You can easily customise the sender name, email address, and reply-to field in WordPress without installing any plugins.

Add the following snippet to your functions.php

// Change default sender email.
add_filter(
	'wp_mail_from',
	function () {
		return 'noreply@example.com';
	}
);

// Change default sender name.
add_filter(
	'wp_mail_from_name',
	function () {
		return 'Example sender';
	}
);

// Change default reply to email.
add_filter(
	'wp_mail',
	function ( $args ) {
		$args['headers'][] = 'Reply-To: Example <noreply@example.com>';

		return $args;
	}
);