Always use correct format for Message-Id headers in mail.
This commit is contained in:
parent
4a15ad3980
commit
688e3ac7b6
2 changed files with 12 additions and 6 deletions
|
|
@ -4,6 +4,7 @@
|
||||||
- fix: Uploads folder case-sensitive
|
- fix: Uploads folder case-sensitive
|
||||||
- fix: Creating and updating files in WebGUI creates multiple storage locations.
|
- fix: Creating and updating files in WebGUI creates multiple storage locations.
|
||||||
- fix: Welcome messages shouldn't be added to inbox as pending.
|
- fix: Welcome messages shouldn't be added to inbox as pending.
|
||||||
|
- fix: Always use correct format for Message-Id headers in mail.
|
||||||
|
|
||||||
|
|
||||||
7.3.16
|
7.3.16
|
||||||
|
|
|
||||||
|
|
@ -246,12 +246,17 @@ sub create {
|
||||||
}
|
}
|
||||||
my $from = $headers->{from} || $session->setting->get("companyEmail");
|
my $from = $headers->{from} || $session->setting->get("companyEmail");
|
||||||
my $type = $headers->{contentType} || "multipart/mixed";
|
my $type = $headers->{contentType} || "multipart/mixed";
|
||||||
my $domain = $from;
|
|
||||||
$domain =~ s/.*\@(.*)/$1/;
|
# format of Message-Id should be '<unique-id@domain>'
|
||||||
my $id = $headers->{messageId} || "WebGUI-".$session->id->generate;
|
my $id = $headers->{messageId} || "WebGUI-" . $session->id->generate;
|
||||||
unless ($id =~ m/\@/) {
|
if ($id !~ m/\@/) {
|
||||||
$id .= '@'.$domain;
|
my $domain = $from;
|
||||||
}
|
$domain =~ s/.*\@//msx;
|
||||||
|
$id .= '@' . $domain;
|
||||||
|
}
|
||||||
|
if ($id !~ m/[<>]/msx) {
|
||||||
|
$id = "<$id>";
|
||||||
|
}
|
||||||
my $message = MIME::Entity->build(
|
my $message = MIME::Entity->build(
|
||||||
Type=>$type,
|
Type=>$type,
|
||||||
From=>$from,
|
From=>$from,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue