Topic on Extension talk:ContactPage

Requires smtp server to be open relay

2
203.15.33.148 (talkcontribs)

This extension overrides the sender email with the one provided by in the form or for the logged in user, unless your smtp server is operating as an open relay this will not work. I had to add a hook 'onEmailUser' to override this behaviour.

Sophivorus (talkcontribs)

Indeed, here is the hook I ended up using:

$wgHooks['EmailUser'][] = function ( &$address, &$from, &$subject, &$text, &$error ) {
	global $wgPasswordSender;
	$from->address = $wgPasswordSender;
};
Reply to "Requires smtp server to be open relay"