summaryrefslogtreecommitdiff
path: root/inc/mail.php
diff options
context:
space:
mode:
authorMatthias Schulte <post@lupo49.de>2011-06-26 16:54:34 +0200
committerMatthias Schulte <post@lupo49.de>2011-06-26 16:54:34 +0200
commit96569d486b765a54033635135007a20bc4368868 (patch)
treec3542edff53fac3e8f5cddaf5f22ea360e9fa5db /inc/mail.php
parentd90bf47f34fa48745fa944f76024f14a5690a408 (diff)
downloadrpg-96569d486b765a54033635135007a20bc4368868.tar.gz
rpg-96569d486b765a54033635135007a20bc4368868.tar.bz2
The mail() function shouldn't be executed when no recipients are given.
Empty to, cc or bcc fields could lead to an Internal Server Error: malformed header from script. Bad header=No recipient addresses found...
Diffstat (limited to 'inc/mail.php')
-rw-r--r--inc/mail.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/inc/mail.php b/inc/mail.php
index 8742e17f6..01b2895e1 100644
--- a/inc/mail.php
+++ b/inc/mail.php
@@ -104,6 +104,9 @@ function _mail_send_action($data) {
$headers = isset($data['headers']) ? $data['headers'] : null;
$params = isset($data['params']) ? $data['params'] : null;
+ // discard mail request if no recipients are available
+ if(trim($to) === '' && trim($cc) === '' && trim($bcc) === '') return false;
+
// end additional code to support event ... original mail_send() code from here
if(defined('MAILHEADER_ASCIIONLY')){