Hello,
got today a mail with some nice ideas for a tweaked mailer class. Here are the descriptions and the changes:
1. multiple recipientsFirst change is to support multiple recipients on form submission (For example, when a user submits a web request in my case there are usually always two persons responsible - one is the primary responsible and one the secondary when the first is not available. Depending on the particular form it is other people. Creating distribution lists on the mail server is more difficult and I neither have the permissions to do that. So specifying more recpients using comma to separate multiple e-mail addresses is a good help here.
Replace Line 328 of framework/class_wb.php
$myMail->AddAddress($toaddress);
with:
$addresses = explode(",", $toaddress);
if (count($addresses) > 0) {
for ($i = 0; $i < count($addresses); $i++) {
$add = trim($addresses[$i]);
$myMail->AddAddress($add);
}
} else {
$myMail->AddAddress($toaddress);
}
2.) Email output:Second change is because of the fact that the form e-mail sent arrives in a one-liner getting wrapped to multiple lines somewhere which makes the e-mail not very readable.
Replace Line 331 of framework/class_wb.php
$myMail->AltBody = strip_tags($message);
with:
$myMail->AltBody = str_replace("<br \\>", "\r\n", $message);
So please test it.
Matthias