[Bug 593] New - Error when sending message without a "Subject"

bugs@bugs.horde.org bugs@bugs.horde.org
Wed, 24 Jan 2001 12:03:59 -0400


http://bugs.horde.org/show_bug.cgi?id=593

*** shadow/593	Wed Jan 24 12:03:58 2001
--- shadow/593.tmp.14203	Wed Jan 24 12:03:58 2001
***************
*** 0 ****
--- 1,42 ----
+ Bug#: 593
+ Product: Horde
+ Version: 2.2 Stable
+ Platform: PHP Code
+ OS/Version: Solaris
+ Status: NEW   
+ Resolution: 
+ Severity: trivial
+ Priority: P5
+ Component: Core
+ Area: BUILD
+ AssignedTo: chuck@horde.org                            
+ ReportedBy: blair+online@devclue.com               
+ URL: 
+ Summary: Error when sending message without a "Subject"
+ 
+ Horde and Imp 2.2.3.
+ If you compose a message that doesn't have a "Subject" specified, the message
+ will be sent successfully but you get an error message like the following:
+ 
+ Warning: Undefined index: Subject in /opt/htdocs/horde/lib/horde.lib on line
+ 1124
+ 
+ While the message is sent, this has confused quite a few of the people using our
+ Imp setup.
+ 
+ Here is my patch for horde/lib/horde.lib (not sure what format you prefer):
+ 
+ *** horde.lib.0 Wed Jan 24 09:38:51 2001
+ --- horde.lib   Wed Jan 24 09:47:06 2001
+ ***************
+ *** 1121,1126 ****
+ --- 1121,1127 ----
+   
+       // If sendmail fails or is not executable, try the native mail() function.
+       if ($result == 0) {
+ +               if (!isset($envelope['Subject'])) { $envelope['Subject'] = ""; }
+                 if (mail($envelope['To'], $envelope['Subject'], $body, $hdrs .
+ $mhdrs))
+                         $result = 1;
+                 else
+