summaryrefslogtreecommitdiffstats
path: root/system/libraries/Email.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries/Email.php')
-rw-r--r--system/libraries/Email.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index a55d2ffea..c042aaade 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -2,11 +2,11 @@
/**
* CodeIgniter
*
- * An open source application development framework for PHP 5.2.4 or newer
+ * An open source application development framework for PHP
*
* This content is released under the MIT License (MIT)
*
- * Copyright (c) 2014, British Columbia Institute of Technology
+ * Copyright (c) 2014 - 2015, British Columbia Institute of Technology
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +29,7 @@
* @package CodeIgniter
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
- * @copyright Copyright (c) 2014, British Columbia Institute of Technology (http://bcit.ca/)
+ * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://opensource.org/licenses/MIT MIT License
* @link http://codeigniter.com
* @since Version 1.0.0
@@ -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']);