Initial commit: CloudOps infrastructure platform
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace Mautic\EmailBundle\Exception;
|
||||
|
||||
class EmailCouldNotBeSentException extends \Exception
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace Mautic\EmailBundle\Exception;
|
||||
|
||||
class FailedToSendToContactException extends \Exception
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace Mautic\EmailBundle\Exception;
|
||||
|
||||
use Mautic\CoreBundle\Exception\InvalidValueException;
|
||||
|
||||
class InvalidEmailException extends InvalidValueException
|
||||
{
|
||||
public function __construct(
|
||||
protected string $emailAddress,
|
||||
string $message = '',
|
||||
int $code = 0,
|
||||
?\Throwable $previous = null,
|
||||
) {
|
||||
parent::__construct($message, $code, $previous);
|
||||
}
|
||||
|
||||
public function getEmailAddress(): string
|
||||
{
|
||||
return $this->emailAddress;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace Mautic\EmailBundle\Exception;
|
||||
|
||||
class MailboxException extends \Exception
|
||||
{
|
||||
public function __construct($message = null, $code = 0, ?\Exception $previous = null)
|
||||
{
|
||||
if (null === $message) {
|
||||
$message = 'Error communicating with the IMAP server';
|
||||
|
||||
if (function_exists('imap_last_error')) {
|
||||
$message .= ': '.imap_last_error();
|
||||
}
|
||||
}
|
||||
|
||||
parent::__construct($message, $code, $previous);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user