From 3676ab329d40de55fa11b4862cc3fb5350ceedb3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 19 May 2015 17:44:20 -0400 Subject: sohrten url in subject --- IkiWiki/Plugin/emailauth.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'IkiWiki') diff --git a/IkiWiki/Plugin/emailauth.pm b/IkiWiki/Plugin/emailauth.pm index a739c2bc7..a589199d3 100644 --- a/IkiWiki/Plugin/emailauth.pm +++ b/IkiWiki/Plugin/emailauth.pm @@ -78,12 +78,14 @@ sub email_auth ($$$$) { eval q{use Mail::Sendmail}; error($@) if $@; + my $shorturl=$config{url}; + $shorturl=~s/^https?:\/\///i; sendmail( To => $email, From => "$config{wikiname} admin <". (defined $config{adminemail} ? $config{adminemail} : "") .">", - Subject => "$config{wikiname} login | ".$config{url}, + Subject => "$config{wikiname} login | $shorturl", Message => $template->output, ) or error(gettext("Failed to send mail")); -- cgit v1.2.3