mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-04-08 18:55:09 +02:00
Revert "Determine eMail's Content-Type "text/html" if message has "<" and ">" at the beginning and the end."
This reverts commit a85b5aed39888ff21083df46e5af5d8c8f3c80c7.
This commit is contained in:
parent
de6f95b4d6
commit
31e4ea2ba0
@ -1067,25 +1067,13 @@ sub pandora_execute_action ($$$$$$$$$;$) {
|
||||
};
|
||||
|
||||
# Default content type
|
||||
my $content_type;
|
||||
|
||||
# Check if message looks like html.
|
||||
# Assume that html message starts with "<" and ends with ">".
|
||||
if ($field3 =~ /^\s*<.*>\s*$/s ) {
|
||||
$content_type = 'text/html;';
|
||||
}
|
||||
else {
|
||||
$content_type = 'text/plain;';
|
||||
}
|
||||
my $content_type = 'text/html; charset="iso-8859-1"';
|
||||
|
||||
# Check if message has non-ascii chars.
|
||||
# non-ascii chars should be encoded in UTF-8.
|
||||
if ($field3 =~ /[^[:ascii:]]/o) {
|
||||
$field3 = encode("UTF-8", $field3);
|
||||
$content_type .= ' charset="UTF-8"';
|
||||
}
|
||||
else {
|
||||
$content_type .= ' charset="iso-8859-1"';
|
||||
$content_type = 'text/plain; charset="UTF-8"';
|
||||
}
|
||||
|
||||
# Build the mail with attached content
|
||||
|
Loading…
x
Reference in New Issue
Block a user