/home/techb158/ileadtechnology.com/vendor/monolog/monolog/src/Monolog/Handler
NameSizeModeActions
Curl/-0755rm
FingersCrossed/-0755rm
Slack/-0755rm
SyslogUdp/-0755rm
AbstractHandler.php26510644editdlrm
AbstractProcessingHandler.php19140644editdlrm
AbstractSyslogHandler.php35400644editdlrm
AmqpHandler.php51010644editdlrm
BrowserConsoleHandler.php95010644editdlrm
BufferHandler.php46440644editdlrm
ChromePHPHandler.php52500644editdlrm
CouchDBHandler.php21030644editdlrm
CubeHandler.php53990644editdlrm
DeduplicationHandler.php60630644editdlrm
DoctrineCouchDBHandler.php11280644editdlrm
DynamoDbHandler.php24820644editdlrm
ElasticaHandler.php33280644editdlrm
ElasticsearchHandler.php65110644editdlrm
ErrorLogHandler.php25870644editdlrm
FallbackGroupHandler.php17610644editdlrm
FilterHandler.php68630644editdlrm
FingersCrossedHandler.php84690644editdlrm
FirePHPHandler.php52880644editdlrm
FleepHookHandler.php35930644editdlrm
FlowdockHandler.php36220644editdlrm
FormattableHandlerInterface.php8450644editdlrm
FormattableHandlerTrait.php12810644editdlrm
GelfHandler.php13990644editdlrm
GroupHandler.php32340644editdlrm
Handler.php12470644editdlrm
HandlerInterface.php30320644editdlrm
HandlerWrapper.php33580644editdlrm
IFTTTHandler.php21830644editdlrm
InsightOpsHandler.php21060644editdlrm
LogEntriesHandler.php19250644editdlrm
LogglyHandler.php40980644editdlrm
LogmaticHandler.php27160644editdlrm
MailHandler.php23410644editdlrm
MandrillHandler.php24730644editdlrm
MissingExtensionException.php4730644editdlrm
MongoDBHandler.php25450644editdlrm
NativeMailerHandler.php49710644editdlrm
NewRelicHandler.php62110644editdlrm
NoopHandler.php8800644editdlrm
NullHandler.php13370644editdlrm
OverflowHandler.php45330644editdlrm
PHPConsoleHandler.php105400644editdlrm
ProcessableHandlerInterface.php11970644editdlrm
ProcessableHandlerTrait.php17370644editdlrm
ProcessHandler.php52150644editdlrm
PsrHandler.php24400644editdlrm
PushoverHandler.php80850644editdlrm
RedisHandler.php30200644editdlrm
RedisPubSubHandler.php18200644editdlrm
RollbarHandler.php34120644editdlrm
RotatingFileHandler.php63890644editdlrm
SamplingHandler.php43380644editdlrm
SendGridHandler.php28710644editdlrm
SlackHandler.php70200644editdlrm
SlackWebhookHandler.php39230644editdlrm
SocketHandler.php122830644editdlrm
SqsHandler.php17460644editdlrm
StreamHandler.php70620644editdlrm
SwiftMailerHandler.php36690644editdlrm
SymfonyMailerHandler.php35330644editdlrm
SyslogHandler.php19070644editdlrm
SyslogUdpHandler.php44970644editdlrm
TelegramBotHandler.php84140644editdlrm
TestHandler.php67500644editdlrm
WebRequestRecognizerTrait.php5240644editdlrm
WhatFailureGroupHandler.php19490644editdlrm
ZendMonitorHandler.php31370644editdlrm
Edit: /home/techb158/ileadtechnology.com/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php (2473B)
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Monolog\Handler; use Monolog\Logger; use Swift; use Swift_Message; /** * MandrillHandler uses cURL to send the emails to the Mandrill API * * @author Adam Nicholson */ class MandrillHandler extends MailHandler { /** @var Swift_Message */ protected $message; /** @var string */ protected $apiKey; /** * @psalm-param Swift_Message|callable(): Swift_Message $message * * @param string $apiKey A valid Mandrill API key * @param callable|Swift_Message $message An example message for real messages, only the body will be replaced */ public function __construct(string $apiKey, $message, $level = Logger::ERROR, bool $bubble = true) { parent::__construct($level, $bubble); if (!$message instanceof Swift_Message && is_callable($message)) { $message = $message(); } if (!$message instanceof Swift_Message) { throw new \InvalidArgumentException('You must provide either a Swift_Message instance or a callable returning it'); } $this->message = $message; $this->apiKey = $apiKey; } /** * {@inheritDoc} */ protected function send(string $content, array $records): void { $mime = 'text/plain'; if ($this->isHtmlBody($content)) { $mime = 'text/html'; } $message = clone $this->message; $message->setBody($content, $mime); /** @phpstan-ignore-next-line */ if (version_compare(Swift::VERSION, '6.0.0', '>=')) { $message->setDate(new \DateTimeImmutable()); } else { /** @phpstan-ignore-next-line */ $message->setDate(time()); } $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://mandrillapp.com/api/1.0/messages/send-raw.json'); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([ 'key' => $this->apiKey, 'raw_message' => (string) $message, 'async' => false, ])); Curl\Util::execute($ch); } }