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