fix relative links in emails
This commit is contained in:
parent
a742fbe961
commit
0635a2a17e
2 changed files with 33 additions and 0 deletions
|
|
@ -72,6 +72,7 @@
|
||||||
- add: Password recovery can now be based on profile fields or simply by the
|
- add: Password recovery can now be based on profile fields or simply by the
|
||||||
user's e-mail address.
|
user's e-mail address.
|
||||||
- add: Button in Collaboration Systems for managing CS subscription group.
|
- add: Button in Collaboration Systems for managing CS subscription group.
|
||||||
|
- fix: relative links sent out in emails don't work properly
|
||||||
|
|
||||||
7.3.21
|
7.3.21
|
||||||
- fix: Self-deactivation doesn't show login screen after success
|
- fix: Self-deactivation doesn't show login screen after success
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,38 @@ A string of HTML.
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub addHtml {
|
sub addHtml {
|
||||||
|
my $self = shift;
|
||||||
|
my $text = shift;
|
||||||
|
if ($text !~ /<(?:html|body)/) {
|
||||||
|
my $site = $self->session->url->getSiteURL;
|
||||||
|
$text = <<END_HTML;
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<base href="$site">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
$text
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
END_HTML
|
||||||
|
}
|
||||||
|
$self->addHtmlRaw($text);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 addHtmlRaw ( html )
|
||||||
|
|
||||||
|
Appends an HTML block to the message without wrapping in a document.
|
||||||
|
|
||||||
|
=head3 html
|
||||||
|
|
||||||
|
A string of HTML.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
sub addHtmlRaw {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $text = shift;
|
my $text = shift;
|
||||||
$self->{_message}->attach(
|
$self->{_message}->attach(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue