mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 15:34:12 +01:00
N°2504 - Add feature to connect Office mail box with OAuth2 for Microsoft Graph * Fix legacy mailboxes compatibility
20 lines
338 B
PHP
20 lines
338 B
PHP
<?php
|
|
|
|
namespace Combodo\iTop\Core\Email;
|
|
|
|
use EMailLaminas;
|
|
use EmailSwiftMailer;
|
|
use utils;
|
|
|
|
class EmailFactory
|
|
{
|
|
public static function GetMailer()
|
|
{
|
|
$sTransport = utils::GetConfig()->Get('email_transport');
|
|
if ($sTransport == 'SMTP_OAuth') {
|
|
return EMailLaminas::GetMailer();
|
|
}
|
|
|
|
return EmailSwiftMailer::GetMailer();
|
|
}
|
|
} |