From 75b90205c29427fd5f7e2d1a2ee5b47a26fca7cf Mon Sep 17 00:00:00 2001 From: Paul Klimov Date: Tue, 29 Oct 2013 16:11:57 +0200 Subject: [PATCH] Email message charset setup added. --- yii/swiftmailer/Message.php | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/yii/swiftmailer/Message.php b/yii/swiftmailer/Message.php index 42d25e7..89a871d 100644 --- a/yii/swiftmailer/Message.php +++ b/yii/swiftmailer/Message.php @@ -42,6 +42,22 @@ class Message extends BaseMessage /** * @inheritdoc */ + public function setCharset($charset) + { + $this->getSwiftMessage()->setCharset($charset); + } + + /** + * @return string the character set of this message. + */ + public function getCharset() + { + return $this->getSwiftMessage()->getCharset(); + } + + /** + * @inheritdoc + */ public function setFrom($from) { $this->getSwiftMessage()->setFrom($from); @@ -232,8 +248,8 @@ class Message extends BaseMessage { $embedFile = \Swift_EmbeddedFile::newInstance($content); if (!empty($options['fileName'])) { - $embedFile->setFilename($options['fileName']); - } + $embedFile->setFilename($options['fileName']); + } if (!empty($options['contentType'])) { $embedFile->setContentType($options['contentType']); }