private function createStringAttachments($attachments)
    {
        if (array_key_exists('string', $attachments)) {
            $this->mailer->addStringAttachment($attachments['string'], $attachments['name']);
        } else {
            foreach ($attachments as $attachment) {
                $this->mailer->addStringAttachment($attachment['string'], $attachment['name']);
            }
        }
    }