Verifying From header before send mail
Signed-off-by: Michael Granados <michaelgranados@gmail.com>
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index a55d2ff..34ce5b1 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -1630,6 +1630,12 @@
*/
public function send($auto_clear = TRUE)
{
+ if ( ! isset($this->_headers['From']) )
+ {
+ $this->_set_error_message('lang:email_no_sender');
+ return FALSE;
+ }
+
if ($this->_replyto_flag === FALSE)
{
$this->reply_to($this->_headers['From']);