[ci skip] Fix 5070
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index 955787d..d4b9387 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -941,7 +941,7 @@
 
 		foreach ($this->_base_charsets as $charset)
 		{
-			if (strpos($charset, $this->charset) === 0)
+			if (strpos($this->charset, $charset) === 0)
 			{
 				$this->_encoding = '7bit';
 			}
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 209193b..00eaeda 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -7,6 +7,10 @@
 
 Release Date: Not Released
 
+Bug fixes for 3.1.5
+-------------------
+
+-  Fixed a bug (#5070) - :doc:`Email Library <libraries/email>` didn't properly detect 7-bit encoding.
 
 Version 3.1.4
 =============