summaryrefslogtreecommitdiffstats
path: root/system/libraries/Email.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-11-13 10:31:39 +0100
committerAndrey Andreev <narf@devilix.net>2014-11-13 10:31:39 +0100
commit2ed757146d04901f39135c68fe090d6d7c4cacb0 (patch)
treef36e869d10e794b40f38d06cb49ec0d81d275fc5 /system/libraries/Email.php
parent81c934729d9fcbb294a8914608c315eed30ff9c4 (diff)
parentdfa1e4034ee944ee250aea46322565188dab2ab3 (diff)
Merge pull request #3319 from dgmike/issue-3313
Verifying From header before send mail
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..5cb16896f 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_from');
+ return FALSE;
+ }
+
if ($this->_replyto_flag === FALSE)
{
$this->reply_to($this->_headers['From']);