Email\Sending add dedicated kv folding flag

kv folding is now done via flag and only if an encoded is detected that
is japanese or UTF-8
This commit is contained in:
Clemens Schwaighofer
2022-07-04 15:45:51 +09:00
parent 7b5bddb529
commit 6b4f310cd2
3 changed files with 205 additions and 23 deletions

View File

@@ -70,10 +70,11 @@ $status = Email::sendEmail(
],
[],
'UTF-8',
false,
true,
$log
);
print "SENDING: " . $status . "<br>";
print "SENDING A: " . $status . "<br>";
$status = Email::sendEmail(
'TEST {REPLACE}',
'BODY {OTHER}',
@@ -97,10 +98,11 @@ $status = Email::sendEmail(
'OTHER' => '**other**'
],
'UTF-8',
false,
true,
$log
);
print "SENDING: " . $status . "<br>";
print "SENDING B: " . $status . "<br>";
$status = Email::sendEmail(
'TEST',
@@ -110,10 +112,29 @@ $status = Email::sendEmail(
['a@a.com', 'b@b.com'],
[],
'UTF-8',
false,
true,
$log
);
print "SENDING: " . $status . "<br>";
print "SENDING C: " . $status . "<br>";
// SUBJECT 日本語カタカナパ
$status = Email::sendEmail(
'TEST 日本語カタカナパカタカナバ',
'BODY 日本語カタカナパカタカナバ',
'test@test.com',
'Test Name 日本語カタカナパ',
[
['email' => 'a@a.com', 'name' => 'a 日本語カタカナパカタカナバ'],
['email' => 'b@b.com', 'name' => 'b 日本語プブガバケブプガバケ'],
],
[],
'UTF-8',
false,
true,
$log
);
print "SENDING D: " . $status . "<br>";
// error message
print $log->printErrorMsg();