diff --git a/smtp.mail.inc b/smtp.mail.inc
index 4aa423a..19ef8f9 100644
--- a/smtp.mail.inc
+++ b/smtp.mail.inc
@@ -162,9 +162,8 @@ class SmtpMailSystem implements MailSystemInterface {
             }
           }
           // Set the charset based on the provided value, if there is one.
-          $charset = $vars['charset'];
-          if ($charset) {
-            $mailer->CharSet = $charset;
+          if (isset($vars['charset'])) {
+            $mailer->CharSet = $vars['charset'];
           }
           switch ($vars[0]) {
             case 'text/plain':
