public static function setDefaultDriver(Rhymix\Framework\Drivers\SMSInterface $driver): void
Set the default driver.
public static function getDefaultDriver(): Rhymix\Framework\Drivers\SMSInterface
Get the default driver.
public static function addDriver(Rhymix\Framework\Drivers\SMSInterface $driver): void
Add a custom mail driver.
public static function getSupportedDrivers(): array
Get the list of supported mail drivers.
public function __construct()
The constructor.
public function setFrom(string $number): bool
Set the sender's phone number.
public function getFrom(): ?string
Get the sender's phone number.
public function addTo(
string $number,
string $country = '0'
): bool
Add a recipient.
public function getRecipients(): array
Get the list of recipients without country codes.
public function getRecipientsWithCountry(): array
Get the list of recipients with country codes.
public function getRecipientsGroupedByCountry(): array
Get the list of recipients grouped by country code.
public function setSubject(string $subject): bool
Set the subject.
public function getSubject(): string
Get the subject.
public function setTitle(string $subject): bool
Set the subject (alias to setSubject).
public function getTitle(): string
Get the subject (alias to getSubject).
public function setBody(string $content): bool
Set the content.
public function getBody(): string
Get the content.
public function setContent(string $content): bool
Set the content (alias to setBody).
public function getContent(): string
Get the content (alias to getBody).
public function attach(
string $local_filename,
?string $display_filename = null
): bool
Attach a file.
public function getAttachments(): array
Get the list of attachments to this message.
public function setExtraVar(
string $key,
$value
): void
Set an extra variable.
public function getExtraVar(string $key)
Get an extra variable.
public function getExtraVars(): array
Get all extra variables.
public function setExtraVars(array $vars): void
Set all extra variables.
public function setDelay(int $when): bool
Delay sending the message. Delays (in seconds) less than 1 year will be treated as relative to the current time. Greater values will be interpreted as a Unix timestamp. This feature may not be implemented by all drivers.
public function getDelay(): int
Get the Unix timestamp of when to send the message. This method always returns a Unix timestamp, even if the original value was given as a relative delay. This feature may not be implemented by all drivers.
public function forceSMS(): void
Force this message to use SMS (not LMS or MMS).
public function unforceSMS(): void
Unforce this message to use SMS (not LMS or MMS).
public function isForceSMS(): bool
Check if this message is forced to use SMS.
public function allowSplitSMS(): void
Allow this message to be split into multiple SMS.
public function allowSplitLMS(): void
Allow this message to be split into multiple LMS.
public function disallowSplitSMS(): void
Disallow this message to be split into multiple SMS.
public function disallowSplitLMS(): void
Disallow this message to be split into multiple LMS.
public function isSplitSMSAllowed(): bool
Check if splitting this message into multiple SMS is allowed.
public function isSplitLMSAllowed(): bool
Check if splitting this message into multiple LMS is allowed.
public function send(bool $sync = false): bool
Send the message.
public static function sendAsync(self $sms): void
Send an SMS asynchronously (for Queue integration).
public function isSent(): bool
Check if the message was sent.
public function getCaller(): string
Get caller information.
public function getErrors(): array
Get errors.
public function addError(string $message): void
Add an error message.