MailService
class MailService (View source)
Methods
bool
sendMail(string $to, string $subject, string $body, string $plainBody = '', array $headers = [])
Send an email using the configured mail transport
bool
sendNewAccountEmail(string $to, string $username, string $password, string $fullname = '')
Send a new account email with login credentials
bool
canConnectToMailServer(string $host, int $port)
Verify that we can connect to the mail server This tests basic connectivity before attempting to send mail
bool
isMailConfigurationValid()
Verify mail configuration is valid before attempting to send
Details
__construct(ConfigurationManager $config, LoggerInterface|null $logger = null)
No description
bool
sendMail(string $to, string $subject, string $body, string $plainBody = '', array $headers = [])
Send an email using the configured mail transport
bool
sendNewAccountEmail(string $to, string $username, string $password, string $fullname = '')
Send a new account email with login credentials
bool
canConnectToMailServer(string $host, int $port)
Verify that we can connect to the mail server This tests basic connectivity before attempting to send mail
bool
isMailConfigurationValid()
Verify mail configuration is valid before attempting to send