From 32923e732b846af791b58e7b2daed8585d1819f6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 2 Oct 2015 11:49:47 -0400 Subject: emailauth: Added emailauth_sender config. --- IkiWiki/Plugin/emailauth.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'IkiWiki') diff --git a/IkiWiki/Plugin/emailauth.pm b/IkiWiki/Plugin/emailauth.pm index a589199d3..6674fe3d6 100644 --- a/IkiWiki/Plugin/emailauth.pm +++ b/IkiWiki/Plugin/emailauth.pm @@ -26,6 +26,12 @@ sub getsetup () { rebuild => 0, section => "auth", }, + emailauth_sender => { + type => "string", + description => "email address to send emailauth mails as (default: adminemail)", + safe => 1, + rebuild => 0, + }, } sub email_setup ($$) { @@ -80,10 +86,12 @@ sub email_auth ($$$$) { error($@) if $@; my $shorturl=$config{url}; $shorturl=~s/^https?:\/\///i; + my $emailauth_sender=$config{emailauth_sender}; + $emailauth_sender=$config{adminemail} unless defined $emailauth_sender; sendmail( To => $email, From => "$config{wikiname} admin <". - (defined $config{adminemail} ? $config{adminemail} : "") + (defined $emailauth_sender ? $emailauth_sender : "") .">", Subject => "$config{wikiname} login | $shorturl", Message => $template->output, -- cgit v1.2.3