diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-10-02 11:49:47 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-10-02 11:49:47 -0400 |
commit | 32923e732b846af791b58e7b2daed8585d1819f6 (patch) | |
tree | 3544305c7c88bc2df5326bf518821b97644361a7 /IkiWiki | |
parent | c63d71bbf3d160db98a2136a32624d901c0b1b4d (diff) | |
download | ikiwiki-32923e732b846af791b58e7b2daed8585d1819f6.tar ikiwiki-32923e732b846af791b58e7b2daed8585d1819f6.tar.gz |
emailauth: Added emailauth_sender config.
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/emailauth.pm | 10 |
1 files changed, 9 insertions, 1 deletions
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, |