summaryrefslogtreecommitdiffstats
path: root/system/libraries/Email.php
diff options
context:
space:
mode:
authorMichael Granados <michaelgranados@gmail.com>2014-11-09 05:43:48 +0100
committerMichael Granados <michaelgranados@gmail.com>2014-11-09 05:43:48 +0100
commit0b85d6b3bb0236a6567ebc8f42b643d5486070ef (patch)
tree13103a01da0b0628b5ffc9ca6e7bf490953a678b /system/libraries/Email.php
parent32a077a73e33bc3367db6353d21300259e2cc4d2 (diff)
Verifying From header before send mail
Signed-off-by: Michael Granados <michaelgranados@gmail.com>
Diffstat (limited to 'system/libraries/Email.php')
-rw-r--r--system/libraries/Email.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index a55d2ffea..34ce5b156 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -1630,6 +1630,12 @@ class CI_Email {
*/
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']);