public function testSendMailWithAttachments(): void { $mailer = Craft::$app->getMailer()->compose() ->setTo('cde-web-admin@healthfirst.org') ->setSubject('Test with Attachments') ->setHtmlBody('

This is a test email with attachments

') ->attachContent('Attachment Content', ['fileName' => 'attachment.txt']); $this->assertTrue($mailer->send()); } public function testSendMailWithCCAndBCC(): void { $mailer = Craft::$app->getMailer()->compose() ->setTo('recipient@example.com') ->setCc('cc@example.com') ->setBcc('bcc@example.com') ->setSubject('Test with CC and BCC') ->setHtmlBody('

This is a test email with CC and BCC recipients

'); $this->assertTrue($mailer->send()); } public function testSetReplyToAddress(): void { $mailer = Craft::$app->getMailer()->compose() ->setTo('recipient@example.com') ->setSubject('Test Reply-To Address') ->setHtmlBody('

This is a test email with a reply-to address

') ->setReplyTo('reply-to@example.com'); $this->assertTrue($mailer->send()); } public function testSendMailWithInlineAttachments(): void { $mailer = Craft::$app->getMailer()->compose() ->setTo('cde-web-admin@healthfirst.org') ->setSubject('Test with Inline Attachments') ->setHtmlBody('

This is a test email with inline attachments

') ->attachContent('Inline Attachment Content', ['fileName' => 'logo.png', 'cid' => 'logo']); $this->assertTrue($mailer->send()); }