- Edited
Hello!
I applied patches #6089 and #6107 to a fresh installation and nothing changed. The issue with the incorrect CC: header sequence persisted.
As in current state we have big issues with the production ticketing system if collaborators are removed from tickets I found a workaround by editing class.mailer.php so that collaborators are added with To: header instead of Cc:
What I actually did was changing the calls to the function addCc
into addTo
in // Add recipients
bloc:
...
// Add recipients
if (!is_array($recipients) && (!$recipients instanceof MailingList))
$recipients = array($recipients);
foreach ($recipients as $recipient) {
if ($recipient instanceof ClientSession)
$recipient = $recipient->getSessionUser();
switch (true) {
case $recipient instanceof EmailRecipient:
$addr = sprintf('"%s" <%s>',
$recipient->getName(),
$recipient->getEmail());
switch ($recipient->getType()) {
case 'to':
$mime->addTo($addr);
break;
case 'cc':
//workaround to incorrect header sequence: addCc -> addTo
//$mime->addCc($addr);
$mime->addTo($addr);
break;
case 'bcc':
$mime->addBcc($addr);
break;
}
break;
case $recipient instanceof TicketOwner:
case $recipient instanceof Staff:
$mime->addTo(sprintf('"%s" <%s>',
$recipient->getName(),
$recipient->getEmail()));
break;
case $recipient instanceof Collaborator:
//workaround to incorrect header sequence: addCc -> addTo
//$mime->addCc(sprintf('"%s" <%s>',
$mime->addTo(sprintf('"%s" <%s>',
$recipient->getName(),
$recipient->getEmail()));
break;
case $recipient instanceof EmailAddress:
$mime->addTo($recipient->getAddress());
break;
default:
// Assuming email address.
$mime->addTo($recipient);
}
...
Hope that issue will be fixed in next release (I really don't believe it is just me).
Thank You to all people that work or collaborate on the OSTicket project; the product is really a good one.
Have a nice day,
Carlo